[old version]The C++20 Synchrononization Library
summary
C++20 adds concrete primitives and a working demo: a small tasking runtime implements a bounded MPMC queue, jthread with stop_token and proper join-on-destruction, plus termination via a latch-and-barrier pattern so workers drain before exit. New APIs include atomic::wait/notify, atomic_ref with floating-point fetch_add, counting and binary semaphores, and a fair ticket mutex; the demo uses these to parallelize histogram and a work-efficient inclusive_scan and claims to target GPUs with a libc++ CUDA port.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:29Why C++20 needs sync primitives
- 11:51Tasking runtime with jthread
- 21:50Low-latency mutex alternatives
- 36:00Termination detection with latches
- 43:00Parallel histogram with atomic_ref
- 51:26Parallel inclusive scan algorithm
- 1:00:39Summary
related talks
01h 07mAn Introduction to Multithreading in C++20
59mThreads and Locks must Go
01h 04mConcurrency TS2: Improved C++ Concurrency and Lock-free Programming
01h 00mC++20 - the hidden pearls
05mFast Parallel Programming using Modern C++
54mC++26: an overview
01h 02mC++20’s Coroutines for Beginners
56mThe C++ Execution Model
