TechnologiesFoundation, System & Concurrency

Synchronization

iOSmacOStvOSwatchOSvisionOS

Synchronization provides low-level concurrency primitives for safe, lock-free coordination between threads, including atomic values that you read and update with explicit memory orderings. You conform your own types to AtomicRepresentable to make them usable as atomic values, and to AtomicOptionalRepresentable to support atomic optionals. These primitives are available on iOS, macOS, tvOS, watchOS, and visionOS.

Atomic Conformances 2

Protocols you adopt to make your own types usable as atomic values with explicit memory orderings.

  • Pr
    AtomicRepresentableiOS 18.0+
    A type that supports atomic operations through a separate atomic storage
  • Pr
    AtomicOptionalRepresentableiOS 18.0+
    An atomic value that also supports atomic operations when wrapped

Structures 7

  • St
    AtomiciOS 18.0+
    An atomic value.
  • St
    AtomicLazyReferenceiOS 18.0+
    A lazily initializable atomic strong reference.
  • St
    AtomicLoadOrderingiOS 18.0+
    Specifies the memory ordering semantics of an atomic load operation.
  • St
    AtomicStoreOrderingiOS 18.0+
    Specifies the memory ordering semantics of an atomic store operation.
  • St
    AtomicUpdateOrderingiOS 18.0+
    Specifies the memory ordering semantics of an atomic read-modify-write
  • St
    MutexiOS 18.0+
    A synchronization primitive that protects shared mutable state via
  • St
    WordPairiOS 18.0+
    A pair of two word sized `UInt`s.

Extends 31

BoolFloat16FloatDoubleRawRepresentableOptionalUnsafePointerUnsafeMutablePointerUnsafeRawPointerUnsafeMutableRawPointerUnmanagedOpaquePointerObjectIdentifierUnsafeBufferPointerUnsafeMutableBufferPointerUnsafeRawBufferPointerUnsafeMutableRawBufferPointerNeverDurationIntInt8Int16Int32Int64Int128UIntUInt8UInt16UInt32UInt64UInt128
← Foundation, System & Concurrency