public void Dispose() { _isDisposed = true; lock (_timeOutMonitor) { _timeOutMonitor.Dispose(); _timeOutMonitor = null; } lock (_executionManager) { _executionManager.Dispose(); _executionManager = null; } lock (_clientsAndFilters) {// Remove all clients to allow them to UnInitialize, and if they have any unmanaged resources - release them. List <IArbiterClient> clients = new List <IArbiterClient>(_clientsAndFilters.Keys); foreach (IArbiterClient client in clients) { this.RemoveClient(client); } } }
/// <summary> /// /// </summary> public void Dispose() { lock (this) { _threadPool.Dispose(); _pendingEntities.Clear(); _pendingEntities = null; //_executionersAndClientIDs.Clear(); _clientsRunningExecutioners.Clear(); _timeOutMonitor.Dispose(); _timeOutMonitor = null; } }
/// <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; } }