Example #1
0
        private void ProcessQueue()
        {
            lock (m_ActionQueueLock)
            {
                if (m_ActionQueue.Count == 0)
                {
                    return;
                }
            }

            while (true)
            {
                ResponseProcessor action = null;
                bool bEmpty = false;
                lock (m_ActionQueueLock)
                {
                    action = m_ActionQueue.Dequeue();
                    bEmpty = m_ActionQueue.Count == 0;
                }
                action.Process();
                action.Dispose();

                if (bEmpty)
                {
                    break;
                }
            }
        }