Back to Basics: C++ Concurrency
Talkat CppCon 2023 · on Thursday, 2023-10-05· at 14:00· Adams, 6700 North Gaylord Rockies Boulevard·
summary
Covers concrete rules and code rather than fluff: shows how std::thread, std::scoped_lock and std::atomic actually prevent data races, when to prefer C++17 parallel algorithms like transform_reduce, and why mutex contention kills performance. Gives worked examples including 100 threads incrementing a counter (expected 5000 but wrong without sync), explains deadlock scenarios and fixes, and points to upcoming std senders and threadpool in C++26. Watch if wanting runnable patterns and concrete numbers.
AI-written summary · about
chapters (12)
- 0:00Concurrency introduction
- 3:19Concurrency basics
- 7:58Concurrency vs parallelism
- 9:24Parallel algorithms
- 13:19Creating threads in C++
- 17:53Data races and race conditions
- 27:10Mutex synchronization
- 34:58Lock guards to avoid deadlocks
- 43:03Atomic variables
- 47:15Advanced synchronization primitives
- 52:55Concurrency beyond threads
- 55:05Conclusion and key takeaways
related talks
58mC++11 Multithreading done right?
31mRace Conditions - Practical Tools & Techniques for Testing, Preventing, and Debugging C++/C Code
48mSecure C++ Programming
01h 02mLock-free programming for real-time systems
55mMemory Model: Get your shared data under control
54mThe Upcoming Concurrency TS Version 2 for Low-Latency and Lockless Synchronization
01h 33mThe Foundation of C++ Atomics: The Knowledge You Need to Correctly Use C++ Atomics
01h 02mModern C++ Safety and Security At 20
