Search⌘ K

Types of Synchronization & Ordering Constraints

Explore the main types of synchronization and ordering constraints in C++ memory model. Learn how sequential consistency, acquire-release, and relaxed semantics affect atomic and non-atomic operations and their ordering between threads.

We'll cover the following...

There are, roughly speaking, three different types of synchronization and ordering constraints in C++:

  • Sequential consistency: memory_order_seq_cst
  • Acquire-release: memory_order_consume, memory_order_acquire, memory_order_release and
...