BEPUphysics.Threading.SimpleThreadManager.ShutDown C# (CSharp) Метод

ShutDown() публичный Метод

Tells every thread in the thread manager to shut down and waits until completion.
public ShutDown ( ) : void
Результат void
        public void ShutDown()
        {
            var toJoin = new Queue<Thread>();

            for (int i = workers.Count - 1; i >= 0; i--)
            {
                lock (workers)
                {
                    toJoin.Enqueue(workers[i].Thread);
                    workers[i].EnqueueTask(null, null);
                }
            }
            while (toJoin.Count > 0)
            {
                toJoin.Dequeue().Join();
            }
        }