Class

NSRecursiveLock

NSRecursiveLock defines a lock that may be acquired multiple times by the same thread without causing a deadlock, a situation where a thread is permanently blocked waiting for itself to relinquish a lock. While the locking thread has one or more locks, all other threads are prevented from accessing the code protected by the lock.

Symbols

Acquiring a Lock

func lock(before: Date)

Attempts to acquire a lock before a given date.

func `try`()

Attempts to acquire a lock, and immediately returns a Boolean value that indicates whether the attempt was successful.

Naming the Lock

var name: String?

The name associated with the receiver.

Relationships

Inherits From