[To be supplied.]
[Visual Basic] Overloads Public Shared Function WaitAny( _ ByVal waitHandles() As WaitHandle, _ ByVal timeout As TimeSpan, _ ByVal exitContext As Boolean _ ) As Integer [C#] public static int WaitAny( WaitHandle[] waitHandles, TimeSpan timeout, bool exitContext ); [C++] public: static int WaitAny( WaitHandle* waitHandles[], TimeSpan timeout, bool exitContext ); [JScript] public static function WaitAny( waitHandles : WaitHandle[], timeout : TimeSpan, exitContext : Boolean ) : int;
The return value minus WaitObject indicates the array index of the object that satisfied the wait. If more than one object became signaled during the call, this is the array index of the signaled object with the smallest index value of all the signaled objects.
Exception Type | Condition |
---|---|
ArgumentNullException | If any of the objects in the waitHandles array are either a null reference (in Visual Basic Nothing) or are duplicate. |
The array index of the object that satisfied the wait.
Returns when the wait terminates, either when any of the handles are signaled or when time-out occurred. If more than one object became signaled during the call, this is the array index of the signaled object with the smallest index value of all the signaled objects. On some implementations, if more that 64 handles are passed, a NotSupportedException is thrown. If there are duplicates in the array, the call will fail.
WaitHandle Class | WaitHandle Members | System.Threading Namespace | WaitHandle.WaitAny Overload List