One Logo Pool Ball
Synchronization · IOS API REFERENCE

AtomicLoadOrdering

struct · iOS 18.0+ · SDK 27.1

@frozen struct AtomicLoadOrdering

Specifies the memory ordering semantics of an atomic load operation.

Members (4)

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+

sequentiallyConsistent

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

A sequentially consistent load performs an acquiring load 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(): AtomicLoadOrdering
Swift declaration
static var relaxed: AtomicLoadOrdering { 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(): AtomicLoadOrdering
Swift declaration
static var acquiring: AtomicLoadOrdering { get }

An acquiring load 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++.

Skipped declarations

No declarations were skipped in this snapshot.

All Synchronization types →