public void Stop(bool kill) { lock (_ioLock) { ThrowIfDestroyed(); if (constrainedProcessRunner != null) { try { constrainedProcessRunner.StopAll(kill); } catch (TimeoutException) { jobObject.TerminateProcessesAndWait(); } constrainedProcessRunner.Dispose(); constrainedProcessRunner = null; } if (processRunner != null) { processRunner.StopAll(kill); processRunner.Dispose(); processRunner = null; } this.currentState = ContainerState.Stopped; } }
void IDisposable.Dispose() { _processRunner.Dispose(); }