DekGenius.com
[ Team LiB ] Previous Section Next Section

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;

    [ Team LiB ] Previous Section Next Section