Cream.Solver.Join C# (CSharp) Method

Join() public method

Waits until the solver ends the execution.
public Join ( ) : void
return void
        public virtual void Join()
        {
            lock (this)
            {
                if (debug)
                {
                    Console.Out.WriteLine(name + " Join");
                }
                while (_thread == null)
                {
                    try
                    {
                        System.Threading.Monitor.Wait(this);
                    }
                    catch (System.Threading.ThreadInterruptedException)
                    {
                    }
                }
                while (_running)
                {
                    try
                    {
                        System.Threading.Monitor.Wait(this);
                    }
                    catch (System.Threading.ThreadInterruptedException)
                    {
                    }
                }
                _thread = null;
            }
        }