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

  • 相关阅读:
    哪些人需要学习Python开发?
    爬虫为什么用python
    python序列类型包括哪三种
    学习python的五个特点
    学python安装软件推荐
    怎么用python做网站?
    为什么大家都说,人生苦短我用python
    #专题练习# 搜索
    #专题练习# 网络流
    #专题练习# 强连通分量,缩点
  • 原文地址:https://www.cnblogs.com/ybhcolin/p/1836228.html
Copyright © 2020-2023  润新知