Up

NSLock+GNUstepBase documentation

Authors

Richard Frith-Macdonald (rfm@gnu.org)

Copyright: (C) 2003-2010 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSLock(GNUstepBase) category
  2. Software documentation for the NSRecursiveLock(GNUstepBase) category

Software documentation for the NSLock(GNUstepBase) category

NSLock(GNUstepBase)

Declared in:
GNUstepBase/NSLock+GNUstepBase.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

newLockAt: 

+ (id) newLockAt: (id*)location;
Availability: Not in OpenStep/MacOS-X

Initializes the id pointed to by location with a new instance of the receiver's class in a thread safe manner, unless it has been previously initialized. Returns the contents pointed to by location. The location is considered unintialized if it contains nil.
This method is used in the GS_INITIALIZED_LOCK macro to initialize lock variables when it cannot be insured that they can be initialized in a thread safe environment.
 NSLock *my_lock = nil;

 void function (void)
 {
   [GS_INITIALIZED_LOCK(my_lock, NSLock) lock];
   do_work ();
   [my_lock unlock];
 }
 
 

Software documentation for the NSRecursiveLock(GNUstepBase) category

NSRecursiveLock(GNUstepBase)

Declared in:
GNUstepBase/NSLock+GNUstepBase.h
Availability: Not in OpenStep/MacOS-X

Description forthcoming.
Method summary

newLockAt: 

+ (id) newLockAt: (id*)location;
Availability: Not in OpenStep/MacOS-X

Initializes the id pointed to by location with a new instance of the receiver's class in a thread safe manner, unless it has been previously initialized. Returns the contents pointed to by location. The location is considered unintialized if it contains nil.
This method is used in the GS_INITIALIZED_LOCK macro to initialize lock variables when it cannot be insured that they can be initialized in a thread safe environment.
 NSLock *my_lock = nil;

 void function (void)
 {
   [GS_INITIALIZED_LOCK(my_lock, NSLock) lock];
   do_work ();
   [my_lock unlock];
 }
 
 


Up