Apache.NMS.ActiveMQ.Threads.CompositeTaskRunner.Run C# (CSharp) Метод

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

private Run ( ) : void
Результат void
        internal void Run()
        {
            try
            {
                while(true)
                {
                    lock(this.mutex)
                    {
                        pending = false;

                        if(this.shutdown)
                        {
                            return;
                        }
                    }

                    if(!this.Iterate())
                    {
                        // wait to be notified.
                        lock(this.mutex)
                        {
                            if(this.shutdown)
                            {
                                return;
                            }

                            while(!this.pending)
                            {
                                Monitor.Wait(this.mutex);
                            }
                        }
                    }
                }
            }
            catch(ThreadAbortException)
            {
                Thread.ResetAbort();
            }
            catch
            {
            }
            finally
            {
                // Make sure we notify any waiting threads that thread
                // has terminated.
                lock(this.mutex)
                {
                    this.terminated = true;
                    Monitor.PulseAll(this.mutex);
                }
            }
        }