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_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 (); }