SynchronizationContext.WaitHelper(IntPtr[], Boolean, Int32) Method

Definition

Important

This API is not CLS-compliant.

CLS-compliant alternative
System.Threading.WaitHandle.WaitAll(WaitHandle[], TimeSpan, Boolean)

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

C#
[System.CLSCompliant(false)]
protected static int WaitHelper(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout);
C#
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
protected static int WaitHelper(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout);

Parameters

waitHandles

IntPtr[]

An array of type IntPtr that contains the native operating system handles.

waitAll
Boolean

true to wait for all handles; false to wait for any handle.

millisecondsTimeout
Int32

The number of milliseconds to wait, or Infinite (-1) to wait indefinitely.

Returns

The array index of the object that satisfied the wait.

Attributes

Remarks

WaitHelper is a declaration for an unmanaged external helper function. WaitHelper is called by the Wait method to wait for a signal for the specified operating system handles.

Applies to

Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1