clojure.lang.Future.cancel C# (CSharp) Метод

cancel() приватный Метод

private cancel ( ) : bool
Результат bool
        public bool cancel()
        {
            // Already completed or cancelled.
            if (_t.Join(0))
                return false;

            // Don't abort until the task thread has established its ThreadAbortException catch block.
            _started.WaitOne();

            _t.Abort();
            _t.Join();
            return _cancelled;
        }

Usage Example

Пример #1
0
        public void DerefThrowsAfterCancellation()
        {
            AFnImpl fn = new AFnImpl();
            fn._fn0 = () => { while (true); };

            Future f = new Future(fn);
            f.cancel();
            f.deref();
        }
All Usage Examples Of clojure.lang.Future::cancel