public void startWork() { Interlocked.Exchange(ref m_Run, 1); ThreadPool.QueueUserWorkItem(new WaitCallback(_worker)); ThreadPool.QueueUserWorkItem(new WaitCallback(_listener)); //Thread thr = new Thread(new ThreadStart(_worker)); //thr.Start(); //Thread thr2 = new Thread(new ThreadStart(_listener)); //thr2.Start(); if (m_Interpreter != null) { m_Interpreter.Start(); } }