ManualResetEvent eventX = new ManualResetEvent(false);//false为非终止状态,true为终止状态
//终止状态 允许访问eventX.waiteone后面的语句,非终止状态不允许访问eventX.waiteone后面的语句
//把终止状态改成非终止用eventX.reset()把非终止状态改成非终止用eventX.set()
ThreadPool.QueueUserWorkItem(new WaitCallback(t.ThreadProc), tpox);加入线程池
ThreadPool.SetMaxThreads (int workerThreads,int completionPortThreads)设置线程池的大小