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