AtomicUpdateOrdering
Specifies the memory ordering semantics of an atomic read-modify-write operation.
@frozen struct AtomicUpdateOrderingOrdering Values
static var relaxed: AtomicUpdateOrderingGuarantees the atomicity of the specific operation on which it is applied, but imposes no ordering constraints on any other variable accesses.
static var acquiring: AtomicUpdateOrderingAn acquiring update synchronizes with a releasing operation whose value its reads. It ensures that the releasing and acquiring threads agree that all subsequent variable accesses on the acquring thread happen after the atomic operation itself.
static var releasing: AtomicUpdateOrderingA releasing update synchronizes with acquiring operations that read the value it stores. It ensures that the releasing and acquiring threads agree that all preceding variable accesses on the releasing thread happen before the atomic operation itself.
static var acquiringAndReleasing: AtomicUpdateOrderingAn acquiring-and-releasing operation is a combination of
.acquiringand.releasingoperation on the same variable.static var sequentiallyConsistent: AtomicUpdateOrderingA sequentially consistent update performs an acquiring-and-releasing update and also guarantees that it and all other sequentially consistent atomic operations (loads, stores, updates) appear to be executed in a single, total sequential ordering.