IT lexicon › Programming › Acquire semantics

Acquire semantics

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

A memory barrier that prevents any read or write after an acquire from starting until the acquire itself completes.

Acquire is the counterpart to release. When a thread reads with acquire semantics, it blocks later memory operations from executing before the acquire finishes. Together, acquire and release form a synchronization mechanism between threads without needing full bidirectional barriers.

In C++ atomics, this is expressed as memory_order_acquire. A typical pattern: a reader waits for a flag with acquire semantics, ensuring it sees all data that another thread wrote before issuing a matching release. Much more efficient than global locking on weakly-ordered architectures like ARM and PowerPC.

← Back to the lexicon