首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > Python > Python线程池的实现

Python线程池的实现

  • 资源大小:12.99 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: python 线程 实现

资 源 简 介

ThreadPool Component The ThreadPool is a component in which other components can get jobs executed. The API has three important functions: ThreadPool(max_workers=5, kill_workers_after=3) Constructor function * max_workers is the maximum number of threads used in/by the pool. * kill_workers_after is the number of seconds a worker should wait for jobs before being killed add_job(function, args=None, return_callback=None) function is the callable that defines the job args is a list of arguments to the function return_callback is called when the function has been performed. shutdown(wait_for_workers_period = 1, clean_shutdown_reties = 5) Blocks so no more jobs are accepted. Waits for all workers to punch out. When a call to this function returns the program can be terminated. * wait_for_workers_period is the number of seconds to wait for workers to shutdown * clean_shutdown_ret

文 件 列 表

Tests
.svn
__init__.py
TestTiming.py
ThreadingXmlRpcServer.py
ThreadPoolXmlRpcServer.py
XmlRpcTest.py
ThreadPool
.svn
__init__.py
ThreadPool.py

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
  • 猕猴桃 5小时前 成为了本站会员

  • 11 8小时前 成为了本站会员

  • 开心快活人 11小时前 成为了本站会员

  • 晋财 12小时前 成为了本站会员

  • WYG 1天前 成为了本站会员

  • Shine 1天前 成为了本站会员

  • 柳贻 1天前 成为了本站会员

  • hallelujah_HL 1天前 成为了本站会员

  • 焦昱贺 1天前 成为了本站会员

  • Rubin 1天前 成为了本站会员

0.366341s