~/talk

The C++ Execution Model

Talkat ACCU 2025 · 2025-04-01..04-04· [c-and-cpp, concurrency]
slides:none on file

Reads the C++ standard and extracts concrete rules: a platform-agnostic flat global storage model, the as-if rule, and how threads evaluate function calls. Demonstrates sequencing vs. synchronizes-with vs. happens before, shows how atomic acquire/release or a semaphore creates a guaranteed ordering while relaxed atomics leave outcome indeterminate, and builds a thread-pool example that breaks with one worker and is fixed by boost-blocking wait that executes queued tasks until completion.

AI-written summary · about

  1. 0:00C++ execution model intro
  2. 1:10Abstract machine concept
  3. 6:13Memory systems vs abstract machine
  4. 8:20Execution threads in C++
  5. 9:48Expressions and evaluation
  6. 12:39Sequenced-before in C++
  7. 17:00Function evaluation rules
  8. 20:31Synchronizes-with across threads
  9. 23:08Happens-before ordering
  10. 27:09Data races and UB
  11. 31:03Thread execution steps
  12. 33:36Forward progress guarantees
  13. 37:06Boost thread pool example
  14. 40:40Summary
~/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.