Exemplo n.º 1
0
        /// <summary>
        /// Releases resources used by the ThreadPoolEx object.
        /// </summary>
        public void Dispose()
        {
            if (!_isDisposed)
            {
                if (!_shutdown)
                {
                    Shutdown();
                }

                if (null != _shuttingDownEvent)
                {
                    _shuttingDownEvent.Close();
                    _shuttingDownEvent = null;
                }
                _workerThreads.Clear();
                _isDisposed = true;
                GC.SuppressFinalize(this);
            }
        }
Exemplo n.º 2
0
 /// <inheritdoc/>
 public override void Clear()
 {
   _queues.Clear();
 }