python线程池threadpool使用篇


当前第2页 返回上一页

上面就是一个具体的线程池的使用流程
threadpool具体的定义如下:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

class ThreadPool:

 """A thread pool, distributing work requests and collecting results.

  

 See the module docstring for more information.

  

 """

 def __init__(self, num_workers, q_size=0, resq_size=0, poll_timeout=5):

 pass

 def createWorkers(self, num_workers, poll_timeout=5):

 pass

 def dismissWorkers(self, num_workers, do_join=False):

 pass

 def joinAllDismissedWorkers(self):

 pass

 def putRequest(self, request, block=True, timeout=None):

 pass

 def poll(self, block=False):

 pass

 def wait(self):

 pass

下一节会详细介绍上面的整个流程以及每个函数:python 线程池threadpool(实现篇)

相关推荐:

python线程池threadpool的实现

以上就是python线程池threadpool使用篇的详细内容,更多文章请关注木庄网络博客!!

返回前面的内容

相关阅读 >>

Python queue模块

总结关于Python中的中文编码问题

Python中is和==有何区别?Python中is和==的区别介绍

Python用户评论标签匹配的解决方法

Python中什么是运算符

学习如何正确使用Python临时文件

Python如何对字符串大小写进行转换

Python实现购物车的简单实例分享

opencv和Python的区别

Python怎么调试?Python怎么debug?

更多相关阅读请进入《Python》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...