RecursiveMutex

public class RecursiveMutex: Lockable

Swift wrapper class for pthread_mutex_t.
Note that this is a recursive version.

Seealso

Locakble
  • Declaration

    Swift

    public enum Error: Swift.Error
  • Initializes a recursive mutex object.

    Throws

    RecursiveMutex.Error on failure.

    Declaration

    Swift

    public required init() throws
  • Locks the recursive mutex.

    Declaration

    Swift

    public func lock()
  • Unlocks the recursive mutex.

    Declaration

    Swift

    public func unlock()
  • Tries to lock the recursive mutex.

    Declaration

    Swift

    public func tryLock() -> Bool

    Return Value

    true if the recursive mutex was successfully locked, otherwise false.