public void Dispose() { if (!_isRunning) { return; } _isRunning = false; _writeTask.Wait(15000); _configResolver.Dispose(); _bufferSegmentProvider.Dispose(); }
public void Dispose() { if (!_isRunning) { return; } _isRunning = false; _pool.Clear(); _writeThread.Join(); _pool.Clear(); if (_pool.IsAnyItemAcquired()) { Thread.Sleep(100); // Can't really do much better here } _configResolver.Dispose(); _bufferSegmentProvider.Dispose(); }