Example #1
0
 public void Dispose()
 {
     if (!_Disposed)
     {
         _Disposed = true;
         _Pool.DoAsync(() => DisposeEngine()).GetAwaiter().GetResult();
         _Pool.Dispose();
     }
 }
Example #2
0
 private void OnWindowClosing(object sender, CancelEventArgs e)
 {
     foreach (var t in _handles)
     {
         CustomThreadPool.CancelUserTask(t);
     }
     _pool.Dispose();
     _accumulator.Dispose();
 }
Example #3
0
 public void Dispose()
 {
     _CustomThreadPool.Dispose();
     foreach (var engine in _EnginesByParitionKey)
     {
         engine.Value.Engine.Dispose();
     }
     _EngineReferences.Clear();
     _EnginesByParitionKey.Clear();
 }
Example #4
0
        public static void Dispose()
        {
            if (modelThreadPool == null)
            {
                return;
            }

            modelThreadPool.Dispose();
            modelThreadPool = null;
        }
Example #5
0
 public void Dispose()
 {
     if (_Engine != null)
     {
         _Engine.Dispose();
     }
     if (_IndexerThread != null)
     {
         _IndexerThread.Dispose();
     }
 }
Example #6
0
 private void Window_Closing(object sender, CancelEventArgs e)
 {
     _pool?.Dispose();
 }