Name

NSRecursiveLock — Mac OS X 10.0

Synopsis

This class is an implementation of the NSLocking protocol that provides a lock that may be acquired multiply by a single thread without creating a deadlock condition. See Chapter 2 for more information on how locking works.

image with no caption

@interface NSRecursiveLock : NSObject <NSLocking>
                                  // Instance Methods
   - (BOOL)lockBeforeDate:(NSDate *)limit;
   - (BOOL)tryLock;
                                  // Methods Implementing NSLocking
   - (void)lock;
   - (void)unlock;

Get Cocoa in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.