One Logo Pool Ball
Synchronization · IOS API REFERENCE

AtomicUpdateOrdering

struct · iOS 18.0+ · SDK 27.1

@frozen struct AtomicUpdateOrdering

Specifies the memory ordering semantics of an atomic read-modify-write operation.

Members (6)

get · iOS 18.0+

description

TypeScript
get description(): string
Swift declaration
var description: String { get }

A textual representation of this instance. Calling this property directly is discouraged. Instead, convert an instance of any type to a string by using the `String(describing:)` initializer. This initializer works with any type, and uses the custom `description` property for types that conform to `CustomStringConvertible`: struct Point: CustomStringConvertible { let x: Int, y: Int var description: String { return "(\(x), \(y))" } } let p = Point(x: 21, y: 30) let s = String(describing: p) print(s) // Prints "(21, 30)" The conversion of `p` to a string in the assignment to `s` uses the `Point` type's `description` property.

get · iOS 18.0+

acquiringAndReleasing

TypeScript
static get acquiringAndReleasing(): AtomicUpdateOrdering
Swift declaration
static var acquiringAndReleasing: AtomicUpdateOrdering { get }

An acquiring-and-releasing operation is a combination of `.acquiring` and `.releasing` operation on the same variable. This value corresponds to `std::memory_order_acq_rel` in C++.

get · iOS 18.0+

sequentiallyConsistent

TypeScript
static get sequentiallyConsistent(): AtomicUpdateOrdering
Swift declaration
static var sequentiallyConsistent: AtomicUpdateOrdering { get }

A 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. This value corresponds to `std::memory_order_seq_cst` in C++.

get · iOS 18.0+

relaxed

TypeScript
static get relaxed(): AtomicUpdateOrdering
Swift declaration
static var relaxed: AtomicUpdateOrdering { get }

Guarantees the atomicity of the specific operation on which it is applied, but imposes no ordering constraints on any other variable accesses. This value corresponds to `std::memory_order_relaxed` in C++.

get · iOS 18.0+

acquiring

TypeScript
static get acquiring(): AtomicUpdateOrdering
Swift declaration
static var acquiring: AtomicUpdateOrdering { get }

An 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 acquiring thread happen after the atomic operation itself. This value corresponds to `std::memory_order_acquire` in C++.

get · iOS 18.0+

releasing

TypeScript
static get releasing(): AtomicUpdateOrdering
Swift declaration
static var releasing: AtomicUpdateOrdering { get }

A 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. This value corresponds to `std::memory_order_release` in C++.

Skipped declarations

No declarations were skipped in this snapshot.

All Synchronization types →