- if (disposed || os_handle == InvalidHandle)
- throw new ObjectDisposedException (GetType ().FullName);
+ return SignalAndWait (toSignal, toWaitOn, -1, false);
+ }
+
+ public static bool SignalAndWait (WaitHandle toSignal,
+ WaitHandle toWaitOn,
+ int millisecondsTimeout,
+ bool exitContext)
+ {
+ if (toSignal == null)
+ throw new ArgumentNullException ("toSignal");
+ if (toWaitOn == null)
+ throw new ArgumentNullException ("toWaitOn");
+
+ if (millisecondsTimeout < -1)
+ throw new ArgumentOutOfRangeException ("millisecondsTimeout");
+
+ return SignalAndWait_Internal (toSignal.Handle, toWaitOn.Handle, millisecondsTimeout, exitContext);