WaitHandle.WaitAll Method (WaitHandle[], Int32, Boolean)
Waits for all the elements in the specified array to receive a signal, using an Int32 value to measure the time interval and specifying whether to exit the synchronization domain before the wait.
Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Syntax
public static bool WaitAll (
WaitHandle[] waitHandles,
intmillisecondsTimeout,
boolexitContext
)
Parameters
- waitHandles
A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object - millisecondsTimeout
The number of milliseconds to wait, or -1 to wait indefinitely. - exitContext
true to exit the synchronization domain for the context before the wait (if in a synchronized context), and reacquire it afterward; otherwise, false.
Return Value
true when every element in waitHandles has received a signal; otherwise false.
See Also
Reference
WaitHandle Class
WaitHandle Members
System.Threading Namespace