线程池(ThreadPool介绍)

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线程的实际值与最大值之间的差异

转载于:https://www.cnblogs.com/ybhcolin/archive/2010/09/26/1836228.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值