日期:2014-05-18 浏览次数:20736 次
ManualResetEvent mre = new ManualResetEvent(false); ThreadPool.QueueUserWorkItem(param => { Thread.Sleep(5000); Console.WriteLine(1); mre.Set(); }); ThreadPool.QueueUserWorkItem(param => { Thread.Sleep(2000); mre.WaitOne(); Console.WriteLine(2); });