memory-model
an archive of posts with this tag
-
atomic and the memory model
How is sharing without locks possible? std::atomic and CAS, reordering by the compiler and CPU, and the seq_cst, acquire/release, and relaxed memory orderings with happens-before.