Keep it simple:
as simple as possible,
but no simpler.
– A. Einstein
Memory Location; Instruction Reordering; Memory Order; Data Races
• Atomics
atomic Types; Flags and Fences
• volatile
• Advice
Concurrency – the execution of several tasks simultaneously – is widely used to improve throughput (by using several processors for a single computation) or to improve responsiveness (by allowing one part of a program to progress while another is waiting for a response).
The C++ standard support for concurrency is introduced in a tutorial manner in §5.3. This chapter and the next provide a more detailed and systematic view.
We call an activity potentially executed concurrently with other ...
No credit card required