Επεξεργασία

Κοινή χρήση μέσω


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

Definition

Important

This API is not CLS-compliant.

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

Waits for any or all the elements in the specified array to receive a signal.

public:
 virtual int Wait(cli::array <IntPtr> ^ waitHandles, bool waitAll, int millisecondsTimeout);
[System.CLSCompliant(false)]
public virtual int Wait (IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout);
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public virtual int Wait (IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout);
[<System.CLSCompliant(false)>]
abstract member Wait : nativeint[] * bool * int -> int
override this.Wait : nativeint[] * bool * int -> int
[<System.CLSCompliant(false)>]
[<System.Security.SecurityCritical>]
abstract member Wait : nativeint[] * bool * int -> int
override this.Wait : nativeint[] * bool * int -> int
Public Overridable Function Wait (waitHandles As IntPtr(), waitAll As Boolean, millisecondsTimeout As Integer) As Integer

Parameters

waitHandles

IntPtr[]

nativeint[]

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

Exceptions

waitHandles is null.

Remarks

The Wait method calls the external declaration WaitHelper to perform the wait activity. Override the Wait method to change the wait behavior for the synchronization context.

Applies to