代码如下 using System; using System.Collections; using System.Collections.Generic; using System.Text; using System.Threading; using System.IO; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { AutoResetEvent mainEvent =new AutoResetEvent (false ); //首次打印线程池状态信息 PrintThreadPoolsInfo(); //创建一个工作进程 ThreadPool.QueueUserWorkItem(new WaitCallback(fnWordThread), mainEvent); //再次打印线程池状态信息 PrintThreadPoolsInfo(); //等待线程操作结束 mainEvent .WaitOne (5000,false ); Console.Read(); } //打印线程池状态的函数 private static void PrintThreadPoolsInfo() { Console.WriteLine ("检查线程池状态:{0}",DateTime.Now.ToString ("HH:mm:ss:fff")); int nWorkThreads;//线程池中辅助线程的最大数目 int nPortThre