NSLock

NSLock Mac OS X 10.0

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.

figs/cocn_1348.gif

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



    Part II: API Quick Reference
    Chapter 13. Foundation Classes