Protocols
The following protocols are available globally.
-
A generic interface describing a lock that can be acquired for synchronous (blocking) reading or writing.
See moreDeclaration
Swift
public protocol Lock
-
Represents a specific registrant within a specific
Registry.A
Receiptis given when an item is registered, and is used to manage the lifetime of item in the registry.When the
See moreReceiptis deallocated, the associated registrant is automatically de-registered. You can also callderegister()to force removal of the item prior to deallocation of itsReceipt.Declaration
Swift
public protocol Receipt: class
-
A generic interface describing a lock that can be acquired for synchronous (blocking) reading or potentially asynchronous writing.
Because the write operations of a
FastWriteLockmay be (but are not guaranteed to be) performed asynchronously, unlike with the completely synchronousLockprotocol:- Write operations require an
@escapingclosure - A value cannot be returned from a write operation
The underlying
See moreFastWriteLockimplementation determines whether and when write operations are performed asynchronously.Declaration
Swift
public protocol FastWriteLock - Write operations require an
View on GitHub
Protocols Reference