# GSLock documentation

rfm@gnu.org
33621
2011-07-24 07:09:22 -0600 (Sun, 24 Jul 2011)
2003 Free Software Foundation, Inc.
Software documentation for the GSLazyLock class
GNUstepBase/GSLock.h
This implements a class which, when used in single-threaded mode, acts like a lock while avoiding the overheads of actually using a real lock. However, when the programm in which the class is used becomes multi-threaded, all instances of this class transform themselves into real locks in the correct state (locked/unlocked) corresponding to whether the lazy lock was locked or not at the point where the program became multi threadeed.
Use of this class allows you to write thread-safe code which avoids locking inefficiencies when used in a single threaded application, without having to worry about dealing with the issue yourself.
Description forthcoming.
_becomeThreaded:
n
Warning the underscore at the start of the name of this method indicates that it is private, for internal use only, and you should not use the method in your code.
Do not use this method ... it is used internally to handle the transition from a single threaded system to a multi threaded one.
Software documentation for the GSLazyRecursiveLock class
GNUstepBase/GSLock.h
This implements a class which, when used in single-threaded mode, acts like a recursive lock while avoiding the overheads of using a real lock. However, when the programm in which the class is used becomes multi-threaded, all instances of this class transform themselves into real locks in the correct state (locked/unlocked) corresponding to whether the lazy recursive lock was locked or not at the point where the program became multi threadeed.
Use of this class allows you to write thread-safe code which avoids locking inefficiencies when used in a single threaded application, without having to worry about dealing with the issue yourself.
Description forthcoming.
_becomeThreaded:
n
Warning the underscore at the start of the name of this method indicates that it is private, for internal use only, and you should not use the method in your code.
Do not use this method ... it is used internally to handle the transition from a single threaded system to a multi threaded one.