예제 #1
0
 public void Dispose()
 {
     ReplicationTask.Dispose();
     if (storageEnvironment != null)
     {
         storageEnvironment.Dispose();
     }
     metricsCounters.Dispose();
 }
예제 #2
0
        public void Dispose()
        {
            // give it 3 seconds to complete requests
            for (int i = 0; i < 30 && Interlocked.Read(ref metricsCounters.ConcurrentRequestsCount) > 0; i++)
            {
                Thread.Sleep(100);
            }

            ReplicationTask.Dispose();
            if (storageEnvironment != null)
            {
                storageEnvironment.Dispose();
            }

            metricsCounters.Dispose();
        }