public void Abort(bool recursive = true) { if (Status != WaitableStatus.Running) { return; } Status = WaitableStatus.Abort; Exception = null; if (recursive) { waitable?.Abort(); } var localFailCallbacks = failCallbacks; Dispose(); foreach (var callback in localFailCallbacks) { callback(Exception); } }
public void Abort(bool recursive = true) { waitable.Abort(recursive); }