liveBook · Manning

Release operation

An atomic operation with release ordering that synchronizes with a corresponding acquire operation, making preceding effects visible.

How 2 Manning books explain it

C++ Concurrency in Action, Second Edition

A release operation is an atomic operation whose ordering can synchronize with an acquire operation on the same memory location.

How it is used
Publishes earlier writes through an atomic location so an acquiring thread can access protected or newly constructed data.
How deep it goes
Traces sequenced-before, synchronizes-with, and happens-before through a spinlock and successful or failed stack compare/exchange operations.
Examples
Uses an atomic_flag spinlock and a reference-counted lock-free stack whose compare/exchange operations distinguish success from failure ordering.
What you can do after
Apply it via C++ atomic memory orders to publish data with release and require acquire before reading dependent non-atomic fields.

Read how C++ Concurrency in Action, Second Edition explains release operation →

Modern C, Third Edition

A release operation is a synchronization operation that makes preceding effects available to a corresponding acquire operation.

How it is used
Coordinates visibility of effects between threads through paired C library synchronization actions.
How deep it goes
Defines publication through synchronization and works through call_once, while deferring detailed mutex behavior.
Examples
Uses call_once initialization, thread creation and joining, thread termination, and mutex release–acquisition pairs.
What you can do after
Evaluate which preceding effects become visible after a corresponding C synchronization operation.

Read how Modern C, Third Edition explains release operation →

Related concepts

Questions about release operation

What is release operation?

An atomic operation with release ordering that synchronizes with a corresponding acquire operation, making preceding effects visible.

Which Manning books explain release operation?

C++ Concurrency in Action, Second Edition and Modern C, Third Edition.

What is release operation a kind of?

Release operation is a kind of operation. An operation is an action or computation performed on or by a system, object, or service that may produce a result or change state.

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.