예제 #1
0
        public virtual void Dispose()
        {
            _isDisposed = true;

            ThreadPoolFastEx threadPool = _defaultThreadPool;

            if (threadPool != null)
            {
                threadPool.Dispose();
                _defaultThreadPool = null;
            }
        }
예제 #2
0
        public void Dispose()
        {
            _isDisposed = true;

            ThreadPoolFastEx threadPool = _threadPool;

            if (threadPool != null)
            {
                threadPool.Dispose();
                _threadPool = null;
            }

            Arbiter arbiter = _arbiter;

            if (arbiter != null)
            {
                arbiter.ClientAddedEvent   -= new ClientManagerClientUpdateDelegate(arbiter_ClientAddedEvent);
                arbiter.ClientRemovedEvent -= new ClientManagerClientUpdateDelegate(arbiter_ClientRemovedEvent);
                _arbiter = null;
            }
        }
예제 #3
0
        /// <summary>
        ///
        /// </summary>
        public void Dispose()
        {
            ThreadPoolFastEx pool = _threadPool;

            if (pool != null)
            {
                pool.Dispose();
            }

            lock (this)
            {
                _pendingEntities.Clear();
                _pendingEntities = null;

                //_executionersAndClientIDs.Clear();
                _clientsRunningExecutioners.Clear();

                _timeOutMonitor.Dispose();
                _timeOutMonitor = null;
            }
        }