This causes the current thread to set a flag indicating that it is interruptible. The method
interrupt() will look at this. If the flag indicates a pending interrupt, that interrupt will be
reissued at this time.
The Class Extensions.Semaphore
This is one of our classes. It implements POSIX-style semaphores. It is probably not useful except
for demo programs.
public void semWait()
This attempts to decrement the value of the semaphore. If it succeeds, it simply returns. If the
value is zero, this will cause the current thread to go to sleep until another thread increments it.
public void semPost()
This increments the value of the semaphore, waking up one thread (if any are sleeping).
The Class Extensions.Mutex
This is one of our classes. It implements POSIX-style (non-recursive) mutex locks. Use only when
synchronized sections won't work, such as chained locking.
public void lock()
This locks the mutex. If the lock is held by a different thread, this thread will go to sleep, waiting
for it to become available.
public void unlock()
This unlocks the mutex, waking up one thread (if any are sleeping).
Search WWH :