Cream.Solver.Stop C# (CSharp) Method

Stop() public method

Stops the execution of the solver.
public Stop ( ) : void
return void
        public virtual void Stop()
        {
            lock (this)
            {
                if (debug)
                {
                    Console.Out.WriteLine(name + " Stop");
                }
                _abort = true;
                while (_running)
                {
                    System.Threading.Monitor.PulseAll(this);
                    try
                    {
                        System.Threading.Monitor.Wait(this);
                    }
                    catch (System.Threading.ThreadInterruptedException)
                    {
                    }
                }
                // For bug fix. (ParallelSolver would not Stop)
                // Modified by Muneyuki Kawatani 05/12/09
                // thread = null;
            }
        }