public void Dispose() { workContext.StopWork(); foreach (var value in ExtensionsState.Values.OfType <IDisposable>()) { value.Dispose(); } TransactionalStorage.Dispose(); IndexStorage.Dispose(); if (tasksBackgroundTask != null) { tasksBackgroundTask.Wait(); } if (indexingBackgroundTask != null) { indexingBackgroundTask.Wait(); } if (reducingBackgroundTask != null) { reducingBackgroundTask.Wait(); } var disposable = backgroundTaskScheduler as IDisposable; if (disposable != null) { disposable.Dispose(); } }
public void Dispose() { workContext.StopWork(); TransactionalStorage.Dispose(); IndexStorage.Dispose(); foreach (var backgroundWorker in backgroundWorkers) { backgroundWorker.Join(); } }
public void Dispose() { AppDomain.CurrentDomain.ProcessExit -= ShouldDispose; AppDomain.CurrentDomain.DomainUnload -= ShouldDispose; storage.Dispose(); search.Dispose(); sigGenerator.Dispose(); BufferPool.Dispose(); metricsCounters.Dispose(); }
public void Dispose() { if (disposed) { return; } AppDomain.CurrentDomain.ProcessExit -= ShouldDispose; AppDomain.CurrentDomain.DomainUnload -= ShouldDispose; disposed = true; synchronizationTask.Dispose(); storage.Dispose(); search.Dispose(); sigGenerator.Dispose(); BufferPool.Dispose(); metricsCounters.Dispose(); }