Up
Authors
- Richard Frith-Macdonald (
rfm@gnu.org
)
-
Date: Generated at 2023-12-20 19:35:46 -0500
Copyright: (C) 2003 Free Software Foundation, Inc.
- Declared in:
- GNUstepBase/GSLock.h
Availability: OpenStep
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.
Instance Variables
Method summary
- (void)
_becomeThreaded: (NSNotification*)n;
Availability: OpenStep
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.
Instance Variables for GSLazyLock Class
@protected int locked;
Availability: OpenStep
Description forthcoming.
- Declared in:
- GNUstepBase/GSLock.h
Availability: OpenStep
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.
Instance Variables
Method summary
- (void)
_becomeThreaded: (NSNotification*)n;
Availability: OpenStep
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.
Instance Variables for GSLazyRecursiveLock Class
@protected int counter;
Availability: OpenStep
Description forthcoming.
Up