ThreadPool 类

      目地:提供執行緒的集區,可用來公佈工作項目,處理非同步的 (Asynchronous) I/O,代表其他執行緒等候,和處理計時器。

命名空间:System.Threading

     成员:

           ThreadPool.GetMaxThreads(out int workerThreads,out int completionPortThreads)方法: 取得线程池之设定最大工作线程数与I/O线程数,可以使用 GetAvailableThreads 判定线程池中实际的线程数.
           ThreadPool.GetMinThreads(out int workerThreads,out int completionPortThreads)方法: 取得线程池之设定最小工作线程数与I/O线程数.

           ThreadPool.SetMaxThreads(int workerThreads,int completionPortThreads) 方法:设置线程池最大工作线程数与I/O线程数

           ThreadPool.SetMinThreads(int workerThreads,int completionPortThreads) 方法:设置线程池最小工作线程数与I/O线程数

           ThreadPool.GetAvailableThreads(out int workerThreads,out int completionPortThreads) 方法:取得工作线程与I/O线程的实际值与最大值之间的差异

posted on 2010-09-26 20:06  为了看阳光  阅读(861)  评论(0编辑  收藏  举报