private uint WaitForAll(uint dwTimeout) { return(SafeNativeMethods.WaitForMultipleObjects(this.nativeHandles, true, dwTimeout)); }
/// <summary> /// Waits for any of the WaitHandles to be signaled. /// </summary> /// <returns> /// The index of the first item in the array that completed the wait operation. /// If this value is outside the bounds of the array, it is an indication of an /// error. /// </returns> public int WaitAny() { int returnVal = (int)SafeNativeMethods.WaitForMultipleObjects(this.nativeHandles, false, NativeConstants.INFINITE); return(returnVal); }