摘要: 本文主要内容:通过AutoResetEvent实现等待线程池内线程执行完成,并进行计时计算。由于方法比较简单直接贴出代码,如下: 1 /// <summary> 2 /// 等待线程池内的所有线程执行完成的一种方法 3 /// </summary> 4 public class ExecutedThreadPool 5 { 6 public void ThreadPoolFinish() 7 { 8 9 int iterations = 10;//迭代的次数10 int doneCount = i... 阅读全文
posted @ 2011-12-16 14:55 走过留痕 阅读(2028) 评论(0) 推荐(1) 编辑