一个实例明白AutoResetEvent和 ManulResetEvent的用法
摘要:
先看一段代码:publicclassWaitHandlerExample {publicstaticAutoResetEvent waitHandler;publicstaticManualResetEvent manualWaitHandler;publicstaticvoidThreadPoolMain() {waitHandler =newAutoResetEvent(false);manualWaitHandler =newManualResetEvent(false);// Queue the task.ThreadPool.QueueUserWorkItem(newWaitCall 阅读全文
posted @ 2012-09-27 22:47 Jason_liu 阅读(171) 评论(0) 推荐(0) 编辑