| java.lang.Object edu.rice.cs.util.CompletionMonitor
CompletionMonitor | public class CompletionMonitor (Code) | | Enables threads to communicate with each other by signaling. Typically, this communication concerns a
task which one thread must complete before other threads can proceed.
|
Method Summary | |
public synchronized boolean | isFlag() | public synchronized void | reset() | public synchronized void | set() | public synchronized boolean | waitOne() |
CompletionMonitor | public CompletionMonitor(boolean flag)(Code) | | |
CompletionMonitor | public CompletionMonitor()(Code) | | |
isFlag | public synchronized boolean isFlag()(Code) | | Returns whether the flag is currently set
|
reset | public synchronized void reset()(Code) | | Sets the state to unsignaled
|
set | public synchronized void set()(Code) | | Sets the state to signaled, indicating that waiting threads can continue
|
waitOne | public synchronized boolean waitOne()(Code) | | Causes the calling thread to wait for the signal to be set before continuing
If the signal is already set, it returns immediately
returns true, unless the waiting thread was interrupted |
|
|