~/talk

An Introduction to Multithreading in C++20

Talkat C++ on Sea 2022 · 2022-07-05..07-07· [concurrency]
slides:none on file

Line-by-line practical guide to C++20 concurrency: picks separation of concerns vs scalability as the design axis, demonstrates Amdahl’s law (90% parallelized still gives ~9.9× on 1000 cores), and shows concrete APIs to use — std::execution::par, third‑party thread pools until P2300 lands, and jthread with stop_token/stop_callback for cooperative cancellation. Covers usable sync primitives in priority order (latch, barrier, future, mutex, semaphore, atomic) and explains when each actually works and why.

AI-written summary · about

  1. 0:00Start
  2. 0:16Assumptions
  3. 1:33Choosing your Concurrency Model
  4. 2:53Multithreading for Scalability
  5. 5:29Parallel Algorithms
  6. 25:55Threads: Callables and Arguments
  7. 30:47Synchronization facilities
  8. 34:52Waiting for tasks with a latch
  9. 38:31Barriers std::barriers is a reusable barrier, Synchronization is done in phases: . Construct a barrier, with a non-zero count and a completion function o One or more threads arrive at the barrier
  10. 52:47Locking mutexes
  11. 53:21Locking multiple mutexes
  12. 57:59Summary
~/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.