Mutex
public class Mutex: Lockable
Swift wrapper class for pthread_mutex_t.
Note that this is a non-recursive version.
Seealso
Locakble-
Initializes a mutex object.
Throws
Mutex.Erroron failure.Declaration
Swift
public required init() throws -
Locks the mutex.
Declaration
Swift
public func lock() -
Unlocks the mutex.
Declaration
Swift
public func unlock() -
Tries to lock the mutex.
Declaration
Swift
public func tryLock() -> BoolReturn Value
trueif the mutex was successfully locked, otherwisefalse.
View on GitHub
Mutex Class Reference