Bryce Adelstein Lelbach — The C++20 synchronization library
In the decade since C 11 shipped, the hardware landscape has changed drastically. 10 years ago, we were still in the early stages of the concurrent processing revolution; 2 to 4 hardware threads were common and more than 10 was “many“. Our tolerance for synchronization latency was greater; we were willing to pay microseconds and milliseconds.
Today, dozens and hundreds of threads are common, and “many“ means hundreds of thousands. Concurrent applications are plagued by contention challenges that were unimaginable a decade ago. With the traditional tools we have today, programmers often have to choose between unacceptable contention and unacceptable high latency when synchronizing between threads.
The C 20 synchronization library brings solutions — new lightweight synchronization primitives that can efficiently marshall hundreds of thousands of threads:
- std::atomic::wait/std::atomic::notify_*: Efficient atomic waiting.
- std::atomic_ref: Atomic operations on non-
1 view
855
278
10 months ago 00:10:17 1
Witchcraft Motion Picture Company presents HYSTERIC (thriller)