Concurrency

Lessons in this group, roughly in build order:

  • threads-std-thread — std::thread (C++11, ) is a portable, move-only handle to one OS thread of execution that runs a…
  • mutexes-locks — A mutex serializes access to shared data so only one thread enters a critical section at a time; RAII lock…
  • condition-variables — A condition variable (<condition_variable>) lets a thread sleep until another thread signals that some…
  • atomics — std::atomic () provides indivisible, race-free operations on a value shared between threads,…
  • std-async-futures-promises gives a one-shot channel for a result computed elsewhere: a std::future reads the value, a…
  • memory-model-data-races — The C++11 memory model defines exactly when one thread’s writes become visible to another, and declares…
  • coroutines-c-20 — A coroutine is a function that can suspend and later resume, keeping its locals alive across the pause —…