NSRecursiveLock
class NSRecursiveLockclass NSRecursiveLockimport Foundationclass NSObjectThe root class of most Foundation class hierarchies.
protocol CustomDebugStringConvertibleA type with a customized textual representation suitable for debugging purposes.
protocol CustomStringConvertibleA type with a customized textual representation.
protocol EquatableA type that can be compared for value equality.
protocol Hashable : EquatableA type that can be hashed into a Hasher to produce an integer hash value.
protocol NSLockingprotocol NSObjectProtocol : AnyObjectThe NSObjectProtocol groups methods that are fundamental to all Foundation objects.
protocol Sendable : SendableMetatypeA thread-safe type whose values can be shared across arbitrary concurrent contexts without introducing a risk of data races. Values of the type may have no shared mutable state, or they may protect that state with a lock or by forcing it to only be accessed from a specific actor.
protocol SendableMetatype : ~Copyable, ~EscapableA type whose metatype can be shared across arbitrary concurrent contexts without introducing a risk of data races. When a generic type T conforms to SendableMetatype, its metatype T.Type conforms to Sendable. All concrete types implicitly conform to the SendableMetatype protocol, so its primary purpose is in generic code to prohibit the use of isolated conformances along with the generic type.
override init() var name: String?func lock() func lock(before limit: Date) -> Bool func `try`() -> Bool func unlock() func withLock<R>(_ body: () throws -> R) rethrows -> R