The Class Extensions.ConditionVar
This is one of our classes. It implements POSIX-style condition variables. Use only when
synchronized sections and wait/notify won't work.
public void condWait(Mutex m)
This causes the current thread to block until it is awakened by either a call to condSignal() or
by a spurious wakeup (not by interruption). It will release the mutex lock for the object as it goes
to sleep, and reacquire it before returning.
public void condSignal()
public void condBroadcast()
These cause (one/all) of the threads that are in a condWait() call to wake up and return.
The Class Extensions.RWLock
This is one of our classes. It implements POSIX-style readers/ writer locks. RWlocks are useful
only in very limited circumstances. Time your program carefully first!
public void readLock()
public void writeLock()
This locks the RWLock in either reader or writer mode. If a read lock is held by a different thread,
this thread will be able to get another read lock directly. If a write lock is requested, the current
thread must go to sleep, waiting for it to become available.
public void unlock()
This unlocks the RWLock (both for readers and for writers). If this is the last reader, it will wake
up one writer thread (if any are sleeping). If this is a writer, it will wake up one writer thread (if
any are sleeping); otherwise, it will wake up all the sleeping threads with reader requests.
The Class Extensions.Barrier
Search WWH :