~/talk

Concurrency in C++20: A Deep Dive

Talkat Meeting C++ 2023 · 2023-11-12..11-14· [concurrency]
slides:none on file

C++20 actually adds concrete primitives and shows measured tradeoffs: atomic_flag stays the only guaranteed lockfree atomic, compare_exchange_strong underpins lockfree algorithms, and atomics gain wait/notify that block when the value matches a predicate. The library adds atomic_ref, atomic shared/weak pointer wrappers (currently locking), counting and binary semaphore, latch and barrier for one‑shot and reusable joins, cooperative interruption with stop_token/stop_source, jthread that auto‑joins, and synchronized output; benchmarks show condition_variable is slow while semaphores match atomics for a 1M ping‑pong.

AI-written summary · about

  1. 0:00Introduction
  2. 1:12Atomic operations
  3. 9:49Atomic waiting and notification
  4. 11:55Atomic smart pointers
  5. 15:00Atomic reference
  6. 19:18Semaphores
  7. 23:54Condition variables
  8. 34:02Ping pong game comparison
  9. 41:30Latches and barriers
  10. 47:33Cooperative interruption
  11. 55:41Jthread and synchronization
  12. 57:07Summary and conclusions
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.