File tom/Lock
The abstract lock.
Inherits
- State supers
- State
methods
deferred void
lock;
-
Undocumented.
deferred void
unlock;
-
Undocumented.
deferred boolean
tryLock;
-
Try to lock, and return
YES
if it succeeded.
A simple lock is a binary lock.
Inherits
- State supers
- Lock
variables
pointer lock;
- The underlying lock.
methods
void
dealloc;
-
Undocumented.
id
init;
-
Designated initializer.
void
lock;
-
Undocumented.
void
unlock;
-
Undocumented.
boolean
tryLock;
-
Undocumented.
A recursive lock is a binary lock which can be obtained multiple
times by the same thread.
Inherits
- State supers
- Lock
variables
pointer lock;
- The underlying lock.
methods
void
dealloc;
-
Undocumented.
id
init;
-
Designated initializer.
void
lock;
-
Undocumented.
void
unlock;
-
Undocumented.
boolean
tryLock;
-
Undocumented.
A semaphore is a lock which can be locked a number of times (1 for a
binary semaphore) before the next attempt to lock will block.
When allocated first, the first lock
will block.
Inherits
- State supers
- Lock
methods
instance (id)
new int num;
-
Return a new
Semaphore
, the first num
lock
operations will
succeed.
variables
pointer sem;
- Pointer to the underlying structure.
methods
void
dealloc;
-
Undocumented.
id
init int num;
-
Designated initializer.
id
init;
-
Another initializer.
void
lock;
-
Undocumented.
void
unlock;
-
Undocumented.
boolean
tryLock;
-
Undocumented.
Generated by tm 1.01.