public void Close() { lock (m_proxyManagerLock) { // The proxy manager may be null if the RemoteWorker has been disposed. This can happen if everything // happened on the master and the Scheduler & Engine are disposed before the worker's acknowledgement for // the final state transition comes in. If that happens, just noop here. if (m_proxyManager == null) { return; } m_proxyManager.Terminate(); } }
/// <nodoc/> public async Task CloseAsync() { await Task.Yield(); m_proxyManager?.Terminate(); }
/// <nodoc/> public void Close() { m_proxyManager?.Terminate(); }