상속: System.Threading.WaitHandle
예제 #1
0
		public static int WaitAny(UnixSignal[] signals, TimeSpan timeout)
		{
			var num = (long)timeout.TotalMilliseconds;
			if (num < -1L || num > 2147483647L)
			{
				throw new ArgumentOutOfRangeException("timeout");
			}
			return WaitAny(signals, (int)num);
		}
예제 #2
0
		public static int WaitAny(UnixSignal[] signals, int millisecondsTimeout)
		{
			if (signals == null)
			{
				throw new ArgumentNullException("signals");
			}
			if (millisecondsTimeout < -1)
			{
				throw new ArgumentOutOfRangeException("millisecondsTimeout");
			}
			var array = new IntPtr[signals.Length];
			for (int i = 0; i < signals.Length; i++)
			{
				array[i] = signals[i].signal_info;
				if (array[i] == IntPtr.Zero)
				{
					throw new InvalidOperationException("Disposed UnixSignal");
				}
			}
			return UnsafeNativeMethods.WaitAny(array, array.Length, millisecondsTimeout, ShuttingDown);
		}
예제 #3
0
		public static int WaitAny(UnixSignal[] signals)
		{
			return WaitAny(signals, -1);
		}