~/talk

An Introduction to Multithreading in C++20

Talkat ACCU 2022 · 2022-04-06..04-09· [concurrency, c-and-cpp]
slides:none on file

Where to start with C++20 multithreading is practical advice not theory: use jthread with stop_token so destructors request stop and join, use parallel algorithms for large data sets but note Amdahl examples like 90% parallel on 1,000 cores gives only ~9.9× speedup, and C++20 lacks standard executors so use third‑party thread pools. Prefer latch and barrier for coordination, futures/promises for one‑shot transfers, mutexes/condition_variable_any for shared state, and reach for semaphores or atomics only as a last resort.

AI-written summary · about

  1. 0:00Start
  2. 0:14Simplifying Assumptions
  3. 0:51Concurrency Model
  4. 4:10Scalability
  5. 5:49Panel Algorithms
  6. 11:24Cooperative Cancellation
  7. 13:05Stop Source
  8. 19:53Starting and Managing Threads
  9. 20:13Standard Async
  10. 26:37C plus 11 Standard Thread
  11. 31:19Synchronization Facilities
  12. 37:50Multi-Threaded Tests
  13. 40:32Barriers
  14. 42:57Barrier Api
  15. 44:19Arrive and Drop
  16. 45:28Loop Synchronization
  17. 47:54One-Shot Transfer of Data between Threads
  18. 49:31Promise
  19. 49:46Package Task
  20. 50:30Default Constructed Future
  21. 55:42Async
  22. 59:01Mutex Types
  23. 59:39Shared Mutex
  24. 1:00:48Locking and Unlocking
  25. 1:02:33Lock Multiple Mutexes
  26. 1:04:20Mutex
  27. 1:11:10Semaphores
  28. 1:13:20Counting Semaphore
  29. 1:15:16Atomics
  30. 1:23:52Are the Thread Executives Supposed To Be Available Soon
  31. 1:26:06Summary
~/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.