Multithreading with Qt
summary
Covers concrete Qt primitives and “what works”: QProcess for coarse-grain parallelism, QThread/QThreadPool/QRunnable and moveToThread for object-based background work (example long task simulating 750 ms sleeps), use Qt::QueuedConnection for cross-thread calls and always call quit() and wait() to avoid segfaults. Shows real uses: QFileDialog file watching, QHostInfo DNS lookups on a thread pool, Qt Creator using many threads for highlighting and builds. Recommends one thread per core only for CPU-bound work, warns of deadlocks, suggests reduced lock scope, QThreadStorage per-thread /dev/random files to fix a benchmark regression, and notes a racy read/write-lock prototype.
AI-written summary · about
chapters (24)
- 0:00Introduction
- 4:20What is multithreading
- 7:33Multithreading in Qt
- 10:21Qt thread basics
- 15:08Moving work to threads
- 20:28QThreadPool and QRunnable
- 23:05QtConcurrent overview
- 25:11Sharing data between threads
- 27:06QMutex and deadlocks
- 31:07QReadWriteLock
- 33:14Thread local storage
- 36:04Advanced synchronization
- 41:06Q&A: Threading APIs
- 42:12Q&A: Mutex and battery life
- 44:17Q&A: Cross-process sync
- 45:42Q&A: Thread priorities
- 47:09Q&A: Sharing data
- 48:35Q&A: Thread design
- 50:21Q&A: QtConcurrent on Symbian
- 51:31Q&A: Debugging deadlocks
- 53:58Q&A: Moving objects to threads
- 54:19Q&A: QSQL across threads
- 55:00Q&A: Auto vs queued connections
- 57:09Q&A: Future of Qt concurrency
related talks
48mAdvanced Qt - A Deep Dive 3/6 Multithreading Part1
01h 00mCreating multithreaded applications with Qt
25mAdvanced Qt - A Deep Dive 4/6 Multithreading Part 2
01h 02mDevelopment of Multi-threaded applications
51mDevelopment of Multi-threaded applications
47m“Multithreading is the answer. What is the question? (part 1 of 2)”
59mAn Introduction to Multithreading in C++20
01h 28mAn Introduction to Multithreading in C++20
