Specifies the memory ordering semantics of an atomic store 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(): AtomicStoreOrdering
Swift declaration
static var sequentiallyConsistent: AtomicStoreOrdering { get }
A sequentially consistent store performs a releasing store 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(): AtomicStoreOrdering
Swift declaration
static var relaxed: AtomicStoreOrdering { 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+
releasing
TypeScript
static get releasing(): AtomicStoreOrdering
Swift declaration
static var releasing: AtomicStoreOrdering { get }
A releasing store 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++.