public abstract class WaitHandle extends Object implements IDisposable
Constructor and Description |
---|
WaitHandle() |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
When overridden in a derived class, releases all resources held by the current
WaitHandle.
|
static void |
waitAll(WaitHandle[] waitHandles)
Waits for all the elements in the specified array to receive a signal.
|
abstract boolean |
waitOne()
Blocks the current thread until the current
WaitHandle receives a signal. |
abstract boolean |
waitOne(int millisecondsTimeout)
Blocks the current thread until the current
WaitHandle receives a signal,
using a 32-bit signed integer to specify the time interval. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dispose
public abstract boolean waitOne()
WaitHandle
receives a signal.public abstract boolean waitOne(int millisecondsTimeout)
WaitHandle
receives a signal,
using a 32-bit signed integer to specify the time interval.millisecondsTimeout
- The number of milliseconds to wait, or -1 to wait indefinitely.public abstract void close()
close
in interface IDisposable
close
in interface AutoCloseable
public static void waitAll(WaitHandle[] waitHandles)
waitHandles
- A WaitHandle
array containing the objects for which the current
instance will wait. This array cannot contain multiple references to the
same object.