~/talk

Atomics, Locks, and Tasks (part 1 of 2)

TalkinGermanat CppCon 2019 · 2019-09-15..09-20· [concurrency, software-architecture]
slides:none on file

Shows an atomic counter example to argue that C++ atomics only solve simple per-operation correctness and do not maintain multi-step invariants, so data races can still occur when several steps must stay consistent. Demonstrates a first-lock/second-lock deadlock pattern to explain why lock ordering or protocols are needed, and presents tasks and std::future/std::async as higher-level alternatives to raw threads—futures carry exceptions/notifications and tasks enable producer/consumer flows without condition variables. Mentions using the parallel STL for declarative concurrency and discusses the performance tradeoffs of these approaches.

AI-written summary · about

  1. 0:00Introduction
  2. 7:09Atomic operations basics
  3. 17:11Locking mechanisms explained
  4. 22:16Deadlock scenarios
  5. 35:17Locking in practice
  6. 46:21Introduction to tasks
  7. 52:49Q&A
~/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.