Share via


WaitAll Method (WaitHandle[], Int32, Boolean)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Waits for all the elements in the specified array to receive a signal, using an Int32 value to specify the time interval and specifying whether to exit the synchronization domain before the wait.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Shared Function WaitAll ( _
    waitHandles As WaitHandle(), _
    millisecondsTimeout As Integer, _
    exitContext As Boolean _
) As Boolean
public static bool WaitAll(
    WaitHandle[] waitHandles,
    int millisecondsTimeout,
    bool exitContext
)
public:
static bool WaitAll(
    array<WaitHandle^>^ waitHandles, 
    int millisecondsTimeout, 
    bool exitContext
)
static member WaitAll : 
        waitHandles:WaitHandle[] * 
        millisecondsTimeout:int * 
        exitContext:bool -> bool 
public static function WaitAll(
    waitHandles : WaitHandle[], 
    millisecondsTimeout : int, 
    exitContext : boolean
) : boolean

Parameters

  • waitHandles
    Type: array<System.Threading. . :: . .WaitHandle> [] () [] []
    A WaitHandle array containing the objects for which the current instance will wait. This array cannot contain multiple references to the same object (duplicates).
  • exitContext
    Type: System. . :: . .Boolean
    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

Type: System. . :: . .Boolean
true when every element in waitHandles has received a signal; otherwise, false.

Remarks

If millisecondsTimeout is zero, the method does not block. It tests the state of the wait handles and returns immediately.

.NET Framework Security

See Also

Reference

WaitHandle Class

WaitAll Overload

System.Threading Namespace