O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSLock — Mac OS X 10.0

Synopsis

NSLock implements thread locks that can be used to let multiple threads in an application access the same data without clashing. The use of NSLock, and locking in general, is discussed in detail in Chapter 2.

image with no caption

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required