private void PokeThreads()
        {
            if (m_threadRunning)
            {
                return;
            }

            m_threadRunning = true;
            //startup worker threads
            for (uint i = 0; i < m_WorkerThreadCount; i++)
            {
                if (m_PollServiceWorkerThreads[i] == null)
                {
                    m_PollServiceWorkerThreads[i]          = new PollServiceWorkerThread(m_server, m_timeOut);
                    m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;

                    m_workerThreads[i] = new Thread(m_PollServiceWorkerThreads[i].ThreadStart)
                    {
                        Name = String.Format("PollServiceWorkerThread{0}", i)
                    };
                    //Can't add to thread Tracker here Referencing Aurora.Framework creates circular reference
                    m_workerThreads[i].Start();
                }
            }

            //start watcher threads
            m_watcherThread = new Thread(ThreadStart)
            {
                Name = "PollServiceWatcherThread"
            };
            m_watcherThread.Start();
        }
        public void Start()
        {
            m_running                  = true;
            m_workerThreads            = new Thread[m_WorkerThreadCount];
            m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount];
            m_workerThreads            = new Thread[m_WorkerThreadCount];

            //startup worker threads
            for (uint i = 0; i < m_WorkerThreadCount; i++)
            {
                m_PollServiceWorkerThreads[i]          = new PollServiceWorkerThread(m_pollTimeout);
                m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;

                m_workerThreads[i] = new Thread(m_PollServiceWorkerThreads[i].ThreadStart)
                {
                    Name = String.Format("PollServiceWorkerThread{0}", i)
                };
                m_workerThreads[i].Start();
            }

            //start watcher threads
            m_watcherThread = new Thread(ThreadStart)
            {
                Name = "PollServiceWatcherThread"
            };
            m_watcherThread.Start();
        }
        public void Start()
        {
            m_running = true;
            m_workerThreads = new Thread[m_WorkerThreadCount];
            m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount];
            m_workerThreads = new Thread[m_WorkerThreadCount];

            //startup worker threads
            for (uint i = 0; i < m_WorkerThreadCount; i++)
            {
                m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, m_pollTimeout);
                m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;
                
                m_workerThreads[i] = new Thread(m_PollServiceWorkerThreads[i].ThreadStart)
                                            {Name = String.Format("PollServiceWorkerThread{0}", i)};
                m_workerThreads[i].Start();
            }

            //start watcher threads
            m_watcherThread = new Thread(ThreadStart) {Name = "PollServiceWatcherThread"};
            m_watcherThread.Start();
        }
        public PollServiceRequestManager(BaseHttpServer pSrv, uint pWorkerThreadCount, int pTimeout)
        {
            m_server = pSrv;
            m_WorkerThreadCount = pWorkerThreadCount;
            m_workerThreads = new Thread[m_WorkerThreadCount];
            m_PollServiceWorkerThreads = new PollServiceWorkerThread[m_WorkerThreadCount];
            m_workerThreads = new Thread[m_WorkerThreadCount];

            //startup worker threads
            for (uint i = 0; i < m_WorkerThreadCount; i++)
            {
                m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, pTimeout);
                m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;
                
                m_workerThreads[i] = new Thread(m_PollServiceWorkerThreads[i].ThreadStart)
                                            {Name = String.Format("PollServiceWorkerThread{0}", i)};
                m_workerThreads[i].Start();
            }

            //start watcher threads
            m_watcherThread = new Thread(ThreadStart) {Name = "PollServiceWatcherThread"};
            m_watcherThread.Start();
        }
Ejemplo n.º 5
0
        private void PokeThreads()
        {
            if (m_threadRunning)
                return;

            m_threadRunning = true;
            //startup worker threads
            for (uint i = 0; i < m_WorkerThreadCount; i++)
            {
                if (m_PollServiceWorkerThreads[i] == null)
                {
                    m_PollServiceWorkerThreads[i] = new PollServiceWorkerThread(m_server, m_timeOut);
                    m_PollServiceWorkerThreads[i].ReQueue += ReQueueEvent;

                    m_workerThreads[i] = new Thread(m_PollServiceWorkerThreads[i].ThreadStart)
                                             {Name = String.Format("PollServiceWorkerThread{0}", i)};
                    //Can't add to thread Tracker here Referencing Aurora.Framework creates circular reference
                    m_workerThreads[i].Start();
                }
            }

            //start watcher threads
            m_watcherThread = new Thread(ThreadStart) {Name = "PollServiceWatcherThread"};
            m_watcherThread.Start();
        }