protected override void OnAbort() { if (CurrentAsyncThread != null) { CurrentAsyncThread.Abort(); // it is not beautiful but there is no other way to stop it. } }
protected override void OnAbort() { if (CurrentAsyncThread != null) { CurrentAsyncThread.Abort(); } }
protected override void OnClose(TimeSpan timeout) { if (CurrentAsyncThread != null) { if (!CancelAsync(timeout)) { CurrentAsyncThread.Abort(); } } }
protected override void OnClose(TimeSpan timeout) { if (CurrentAsyncThread != null) { if (!CancelAsync(timeout)) { if (CurrentAsyncThread != null) // being careful { CurrentAsyncThread.Abort(); // it is not beautiful but there is no other way to stop it. } } } }