Up

GSLock autogsdoc generated documentation

Authors

Richard Frith-Macdonald (rfm@gnu.org)

Version: 1.2

Date: 2003/11/10 15:34:52

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


Contents -

  1. Software documentation for the GSLazyLock class
  2. Software documentation for the GSLazyRecursiveLock class

Software documentation for the GSLazyLock class

GSLazyLock : NSLock

Declared in:
GNUstepBase/GSLock.h
Standards:

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.

Method summary

_becomeThreaded:

- (void) _becomeThreaded: (NSNotification*)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

GSLazyRecursiveLock : NSRecursiveLock

Declared in:
GNUstepBase/GSLock.h
Standards:

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.

Method summary

_becomeThreaded:

- (void) _becomeThreaded: (NSNotification*)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.



Up