~/talk

Thread Support in Qt

Talkat Qt Developer Days 2008 · 2008-10-14..10-15· [concurrency]
links:none on file
slides:none on file

Qt 4 provides concrete threading primitives: QThread is a QObject you subclass and override run, it emits started/finished signals and you must avoid terminate; per-thread event loops give each QObject a thread affinity so events and queued connections go to the receiver’s thread. Synchronization tools include QMutex/QMutexLocker (RAII), QWaitCondition (wait unlocks the mutex), QSemaphore for producer/consumer, QReadWriteLock and QThreadStorage (pointers only). Implicit sharing moves to atomic reference counting so copy‑on‑write is safe but objects themselves still require mutexes to mutate.

AI-written summary · about

  1. 0:00Introduction
  2. 3:33Threading overview in Qt
  3. 6:44QThread class basics
  4. 9:56Sharing data between threads
  5. 14:15QMutex and QMutexLocker
  6. 16:27QWaitCondition for synchronization
  7. 18:57QSemaphore in Qt 3 and 4
  8. 21:02QReadWriteLock for readers
  9. 23:07QThreadStorage for thread-local data
  10. 25:55Posting events between threads
  11. 28:00Signals and slots in threads
  12. 31:56Implicit sharing and threads
  13. 37:04Thread safety limitations
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.