LockMechanism
public enum LockMechanism
Represents different mechanisms that can be used for locking.
-
A mechanism that peforms no read or write locking. This should only be used to optimize for scenarios where a lock is required but thread-safety can be guaranteed through other means. (In other words, if you use this value, you are assuming responsibility for ensuring thread-safety on your own.)
Declaration
Swift
case none
-
A mechanism that relies on a
CriticalSectionfor a re-entrant mutual exclusion lock.Declaration
Swift
case mutex
-
A read/write lock mechanism that relies on a
ReadWriteCoordinatorfor a many-reader/single-writer that can provide optimizedFastWriteLockperformance.Declaration
Swift
case readWrite
-
Creates a new
FastWriteLockinstance that uses the locking mechanism specified by the value of the receiver.Declaration
Swift
public func createFastWriteLock() -> FastWriteLockReturn Value
The new
FastWriteLock.
View on GitHub
LockMechanism Enum Reference