IT lexicon › Programming › Release semantics

Release semantics

Programming På svenska → Updated: 2026-11-15

A memory barrier guaranteeing that all writes before a release operation become visible to a reader who later observes the corresponding acquire.

Release semantics is half of the acquire-release mechanism. When a thread writes with release semantics, all prior memory writes are forced to complete before the release itself. This creates a happens-before edge to a matching acquire on another thread.

The term originates from the Java Memory Model and later C++ atomics. A typical use: one thread writes data, then sets a flag with release, and another thread reads the flag with acquire, guaranteed to see the written data. Acquire-release is often cheaper than full memory barriers on modern processors.

← Back to the lexicon