예제 #1
0
        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();
            }
        }
예제 #2
0
 public void Dispose()
 {
     workContext.StopWork();
     TransactionalStorage.Dispose();
     IndexStorage.Dispose();
     foreach (var backgroundWorker in backgroundWorkers)
     {
         backgroundWorker.Join();
     }
 }
예제 #3
0
        public void Dispose()
        {
            AppDomain.CurrentDomain.ProcessExit  -= ShouldDispose;
            AppDomain.CurrentDomain.DomainUnload -= ShouldDispose;

            storage.Dispose();
            search.Dispose();
            sigGenerator.Dispose();
            BufferPool.Dispose();
            metricsCounters.Dispose();
        }
예제 #4
0
        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();
        }