Development of Multi-threaded applications
summary
Shows concrete code: uses QConcurrent + QFuture/QFutureWatcher to run a slow Fibonacci off the UI thread and keep the UI responsive; implements a real QAtomicPointer lock-free stack (push faster: 700ms→400ms; pop much faster: 2.5s→0.5s on dual‑core) and demonstrates the ABA problem with options (tagged pointers, hazard pointers, LL/SC). Explains Qt5 QMutex internals: atomic pointer states (0,1 or MutexPrivate), refcounted mutex privates, lock‑free free list and futex backend on Linux, and tradeoffs (fairness, timeouts).
AI-written summary · about
chapters (10)
- 0:00Introduction to talk
- 2:35When to use threading
- 3:58Demo of UI responsiveness
- 10:15Lock-free programming basics
- 13:44QAtomic API overview
- 17:55Lock-free stack implementation
- 21:21Benchmarking lock-free vs mutex
- 30:23ABA problem explained
- 35:04QMutex in Qt5 internals
- 49:49Questions and closing
related talks
58mMultithreading with Qt
01h 08mBetter Code: Concurrency
01h 00mCreating multithreaded applications with Qt
01h 04mAtomics, Locks, and Tasks (part 2 of 2)
47m“Multithreading is the answer. What is the question? (part 1 of 2)”
59mAn Introduction to Multithreading in C++20
01h 07mThe C++20 Synchronization Library
53mAtomics, Locks, and Tasks (part 1 of 2)
