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
Receipt
is given when an item is registered, and is used to manage the lifetime of item in the registry.When the
See moreReceipt
is 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
FastWriteLock
may be (but are not guaranteed to be) performed asynchronously, unlike with the completely synchronousLock
protocol:- Write operations require an
@escaping
closure - A value cannot be returned from a write operation
The underlying
See moreFastWriteLock
implementation determines whether and when write operations are performed asynchronously.Declaration
Swift
public protocol FastWriteLock
- Write operations require an