public bool Start() { ActionThread.Start(); TimeoutThread.Start(); ThreadSynchronizer.WaitOne(); ThreadSynchronizer.Close(); return(_success); }
/// <summary> /// If the action takes longer than the wait limit, this will throw a TimeoutException /// </summary> public void Start() { ActionThread.Start(); TimeoutThread.Start(); ThreadSynchronizer.WaitOne(); if (!_success) { throw new TimeoutException(); } ThreadSynchronizer.Close(); }
/// <summary> /// If the action takes longer than the wait limit, this will throw a TimeoutException /// </summary> public bool Start() { ActionThread.Start(); TimeoutThread.Start(); ThreadSynchronizer.WaitOne(); if (!_success) { // throw new TimeoutException(); ActionThread.Abort(); } ThreadSynchronizer.Close(); return(_success); }