Coordinating Access to Data

  • A protected value only allows access from within a locking statement. This prevents accidental unsafe access when thread safety is desired.

    See more

    Declaration

    Swift

    public final class Protected<T>
  • A type that mutually excludes execution of code such that only one unit of code is running at any given time. An implementing type may choose to have readers-writer semantics, such that many readers can read at once, or lock around all reads and writes the same way.

    See more

    Declaration

    Swift

    public protocol Locking