System.Threading.SynchronizationContext.WaitHelper Method

Helper function that waits for any or all the elements in the specified array to receive a signal.

Syntax

[System.CLSCompliant(false)]
[System.Runtime.ConstrainedExecution.PrePrepareMethod]
[System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)]
protected static int WaitHelper (IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)

Parameters

waitHandles
An array of type IntPtr that contains the native operating system handles.
waitAll
true to wait for all handles; false to wait for any handle.
millisecondsTimeout
The number of milliseconds to wait, or Timeout.Infinite (-1) to wait indefinitely.

Returns

The array index of the object that satisfied the wait.

Remarks

SynchronizationContext.WaitHelper(IntPtr[], bool, int) is a declaration for an unmanaged external helper function. SynchronizationContext.WaitHelper(IntPtr[], bool, int) is called by the SynchronizationContext.Wait(IntPtr[], bool, int) method to wait for a signal for the specified operating system handles.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0
Since: .NET 2.0