NSLock

extension NSLock: Locking

A lock object from the Foundation Kit used to coordinate the operation of multiple threads of execution within the same application.

  • Declaration

    Swift

    public func withReadLock<Return>(_ body: () throws -> Return) rethrows -> Return
  • Declaration

    Swift

    public func withAttemptedReadLock<Return>(_ body: () throws -> Return) rethrows -> Return?