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

private Reclaim ( TaskContext ctx ) : void
ctx TaskContext
Результат void
Пример #1
0
        /// <summary>
        /// Wait will wait for the given task to complete, and then dispose
        /// the context. After Wait() returns, you should do nothing else to
        /// the context.
        /// </summary>
        public void Wait()
        {
            if (Worker == null)
            {
                throw new ObjectDisposedException("TaskContext.Wait()");
            }

            Worker = null;
            Event.WaitOne();
            ThreadPoolComponent.Reclaim(this);
        }
Пример #2
0
        public void Dispose()
        {
            if (Worker == null)
            {
                throw new ObjectDisposedException("TaskContext.Dispose()");
            }

            Worker.Context = null;
            Worker         = null;
            ThreadPoolComponent.Reclaim(this);
        }