Exemple #1
0
        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;
            }
        }
Exemple #2
0
 void IDisposable.Dispose()
 {
     _processRunner.Dispose();
 }