The C++20 Synchronization Library
summary
Summarizes the C++20 sync additions and shows a working bounded-depth tasking runtime: uses std::atomic::wait/notify, std::atomic_ref, counting_semaphore, ticket mutex (atomic-backed), jthread + stop_token, and latch/barrier to coordinate hundreds to hundreds-of-thousands of threads. Builds a bounded concurrent queue with semaphores, replaces heavy mutexes with atomic wait/notify, and demonstrates parallel histogram and exclusive-scan implementations. The runtime works but requires a make_progress fallback to avoid submit-induced deadlock and can blow stacks via recursive submit; floating-point atomics and atomic_flag::test are also added.
AI-written summary · about
chapters (10)
- 0:00Start
- 4:33stood threads
- 6:01add a destructor to our thread group class
- 13:30build a concurrent bounded queue
- 22:14build a spin mutex
- 29:57added a test method to atomic flag
- 34:29talk about the termination detection mechanism
- 39:28submit a special task to each one of the queues
- 46:18start off by building a parallel histogram
- 47:45spawn up some number of tasks
related talks
01h 24mConcurrency in C++20 and Beyond
01h 00mConcurrency in C++20: A Deep Dive
01h 08mBetter Code: Concurrency
59mAn Introduction to Multithreading in C++20
01h 00mConcurrency Improvements in C++20: A Deep Dive
47mConcurrent Programming in C++
01h 05m“The Continuing Future of C++ Concurrency"
01h 04mBack to Basics: Concurrency
