CppMem: Atomics with Sequential Consistency

This lesson gives an overview of atomics with sequential consistency used in the context of CppMem.

If you don’t specify the memory model, sequential consistency will be applied. Sequential consistency guarantees two properties: each thread executes its instructions in source code order, and all threads follow the same global order. Here is the optimized version of the program using atomics.

Get hands-on with 1000+ tech skills courses.