コード例 #1
0
 private uint WaitForAll(uint dwTimeout)
 {
     return(SafeNativeMethods.WaitForMultipleObjects(this.nativeHandles, true, dwTimeout));
 }
コード例 #2
0
        /// <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);
        }