~/talk

Concurrent Programming in C++

Talkat NDC TechTown 2017 · 2017-10-17..10-20· [concurrency, c-and-cpp]
slides:none on file

C++11 concurrency features get practical coverage: std::thread plus hardware_concurrency=8 (hyperthreading can mislead), join vs detach (detached threads become daemons), and a concrete race example where 20,000 increments/decrements produce nonzero results until protected by a mutex. Shows RAII for threads, recommends lock_guard and unique_lock/std::lock to avoid deadlock, explains call_once, condition_variable, futures/async (deferred runs on caller), packaged_task and promise for exception-safe, civilized thread-to-thread communication.

AI-written summary · about

  1. 0:00Intro
  2. 1:30Platform Neutral
  3. 8:52Creating Thread
  4. 17:08joining
  5. 19:20Thread Argument Gotcha
  6. 20:03Concurrency & Mutability
  7. 23:39Avoiding Race Condition
  8. 27:02Avoiding Deadlock
  9. 29:46Fixing Deadlock
  10. 30:56Multiple Locks
  11. 32:23Another Race Condition
  12. 40:28async launch options
  13. 42:36Future & Thread Safety
  14. 44:50What's really doing on?
  15. 45:46Using Promise
~/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.