Atomics
import Atomics
import Atomics
func atomicMemoryFence(ordering: AtomicUpdateOrdering)
Establishes a memory ordering without associating it with a particular atomic operation.
struct AtomicLoadOrdering
Specifies the memory ordering semantics of an atomic load operation.
struct AtomicRawRepresentableStorage
The default atomic storage representation for an atomic RawRepresentable
type whose RawValue
conforms to AtomicValue
.
struct AtomicStoreOrdering
Specifies the memory ordering semantics of an atomic store operation.
struct AtomicUpdateOrdering
Specifies the memory ordering semantics of an atomic read-modify-write operation.
struct UnsafeAtomic
An unsafe reference type holding an atomic value, requiring manual memory management of the underlying storage representation.
struct UnsafeAtomicLazyReference
An unsafe reference type holding a lazily initializable atomic strong reference, requiring manual memory management of the underlying storage representation.
class ManagedAtomic
A reference type holding an atomic value, with automatic memory management.
class ManagedAtomicLazyReference
A reference type holding a lazily initializable atomic strong reference, with automatic memory management.
protocol AtomicInteger
A type that supports atomic integer operations through a separate atomic storage representation.
protocol AtomicIntegerStorage
The storage representation for an atomic integer value, providing pointer-based atomic operations.
protocol AtomicOptionalWrappable
An atomic value that also supports atomic operations when wrapped in an Optional
. Atomic optional wrappable types come with a standalone atomic representation for their optional-wrapped variants.
protocol AtomicStorage
The storage representation for an atomic value, providing pointer-based atomic operations. This is a low-level implementation detail of atomic types; instead of directly handling conforming types, it is usually better to use the UnsafeAtomic
or ManagedAtomic
generics – these provide more convenient and safer interfaces while also ensuring that the storage is correctly constructed and destroyed.
protocol AtomicValue
A type that supports atomic operations through a separate atomic storage representation.