Example #1
0
        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);
            }
        }
Example #2
0
 public void Abort(bool recursive = true)
 {
     waitable.Abort(recursive);
 }