Acquire-release semantics
Acquire-release semantics are memory-ordering rules under which release operations make preceding effects visible to acquire operations that synchronize with them.
C++ Concurrency in Action, Second Edition
Acquire-release ordering provides synchronization when an acquire operation reads a value written by a release operation, without imposing a single global order.
- How it is used
- Coordinates visibility of writes between threads without requiring sequential consistency.
- How deep it goes
- Works through matching release and acquire operations, their ordering of relaxed writes, transitive synchronization, and the absence of total order.
- Examples
- Uses two atomic flags, a release-published relaxed write, and a three-thread synchronization chain.
- What you can do after
- Apply it via std::atomic release stores and acquire loads to publish earlier writes between threads.
Read how C++ Concurrency in Action, Second Edition explains acquire-release semantics →
Modern C
A release operation is a concurrency operation that publishes preceding effects so that a corresponding acquire can observe them.
- How it is used
- Establishes visibility of one thread’s earlier effects to another through paired synchronization operations.
- How deep it goes
- Defines the synchronization rule and visibility consequence, then identifies atomic memory orders and library pairs without developing implementation internals.
- Examples
- Uses an input/account-thread exchange, call_once initialization, and atomic_fetch_add_explicit with memory_order_acq_rel.
- What you can do after
- Apply it via C atomic _explicit interfaces or paired library calls to make preceding effects visible across threads.
Modern C, Third Edition
Release semantics are memory-ordering properties that make preceding effects available to a thread that synchronizes with the release operation.
- How it is used
- Establishes when effects in one thread become visible to another through atomic operations or C library synchronization.
- How deep it goes
- Defines directional operations and the read-from synchronization rule, then states its visibility consequence; defers relaxed atomic operations.
- Examples
- Uses two threads exchanging an atomic value and a table of C library release-acquire pairs.
- What you can do after
- Evaluate/understand whether an atomic read or mutex acquisition makes another thread’s preceding effects visible.
Read how Modern C, Third Edition explains acquire-release semantics →
C# Concurrency: Asynchronous and multithreaded programming
Release semantics are memory-ordering guarantees that prevent writes from being moved later than a synchronization operation.
- How it is used
- Protects visibility of shared-data updates when a thread releases a lock.
- How deep it goes
- Defines write-ordering guarantees and relates them to locks, acquire operations, memory barriers, and the memory model.
- Examples
- Uses lock release and Figure 7.1 to illustrate writes becoming available to the next thread.
- What you can do after
- Apply it by locking shared-data access so released changes become visible to the next thread.
Related concepts
- acquire semanticsconfigured by · Acquire semantics prevent subsequent memory operations from being reordered before an acquire operation and make visible effects that happen-before it, including those published by a synchronizing release operation.
- std::memory_order_releaseconfigured by · A C++ memory-order value that gives an atomic store release semantics, making preceding operations visible to a thread that performs a matching acquire operation.
- sequential consistencycontrasts with · Sequential consistency is a memory model in which participating operations appear in a single total order that preserves each thread’s program order.
- read-modify-write operationused by · An operation that reads a value from a location, computes or selects an update, and writes the resulting value back to that location.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.



