Apache.NMS.ActiveMQ.Threads.ThreadPoolExecutor.QueueProcessor C# (CSharp) Метод

QueueProcessor() приватный Метод

private QueueProcessor ( object unused ) : void
unused object
Результат void
        private void QueueProcessor(object unused)
        {
            Future theTask = null;

            lock(syncRoot)
            {
                if(this.workQueue.Count == 0 || this.closing)
                {
                    this.running = false;
                    this.executionComplete.Set();
                    return;
                }

                theTask = this.workQueue.Dequeue();
            }

            try
            {
                theTask.Run();
            }
            finally
            {
                if(this.closing)
                {
                    this.running = false;
                    this.executionComplete.Set();
                }
                else
                {
                    ThreadPool.QueueUserWorkItem(new WaitCallback(QueueProcessor), null);
                }
            }
        }