Waits for any of the elements in the specified array to receive a signal, using a 32-bit signed integer to measure the time interval, and specifying whether to exit the synchronization domain before the wait.
| C# | Visual Basic |
public static int WaitAny( WaitHandle[] waitHandles, int millisecondsTimeout, bool exitContext )
Public Shared Function WaitAny ( _ waitHandles As WaitHandle(), _ millisecondsTimeout As Integer, _ exitContext As Boolean _ ) As Integer
- waitHandles (array< WaitHandle >[]()[])
- A WaitHandle array containing the objects for which the current instance will wait.
- millisecondsTimeout (Int32)
- The number of milliseconds to wait, or Infinite (-1) to wait indefinitely.
- exitContext (Boolean)
- Not supported.
The array index of the object that satisfied the wait, or WaitTimeout if no object satisfied the wait and a time interval equivalent to millisecondsTimeout has passed.