protected virtual void Dispose(bool disposing) { if (disposing) { _isDisposed = true; if (_dispatcher == null) { return; } if (_dispatcher.RemoveQueue(_name)) { lock (_taskQueue) { _dispatcher.AdjustPendingCount(-(_taskQueue.Count + _taskCommonCount)); } } } }