UnfairLock
public class UnfairLock: Lockable
Swift wrapper class for os_unfair_lock_t
.
A low-level lock that allows waiters to block efficiently on contention.
Seealso
Locakble-
Designated initializer. Initializes an unfair lock object.
Declaration
Swift
public required init()
-
Locks an unfair lock.
Declaration
Swift
public func lock()
-
Unlocks an unfair lock.
Declaration
Swift
public func unlock()
-
Tries to lock an unfair lock if it is not already locked.
Declaration
Swift
public func tryLock() -> Bool
Return Value
true
if the lock was successfully locked, otherwisefalse
.