社区
脚本语言
帖子详情
[d]eventlet.tpool.excute阻塞?
shiqing0477
2012-07-26 11:33:41
利用eventlet.tpool.excute(func,para1.para2)创建线程,eventlet.tpool.excute需等待func执行完了才返回?哪位大神指点一下啊?
--------------------------
Double行动:
原帖分数:40
帖子加分:40
...全文
167
2
打赏
收藏
[d]eventlet.tpool.excute阻塞?
利用eventlet.tpool.excute(func,para1.para2)创建线程,eventlet.tpool.excute需等待func执行完了才返回?哪位大神指点一下啊? -------------------------- Double行动: 原帖分数:40 帖子加分:40
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
2 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
shiqing0477
2012-07-26
打赏
举报
回复
[Quote=引用 1 楼 的回复:]
eventlet.tpool.execute(meth, *args, **kwargs)
Execute meth in a Python thread, blocking the current coroutine/ greenthread until the method completes.
它需要等待 meth 执行完后才能继续
[/Quote]
那么eventlet库里的那些线程都是得阻塞等待的?那这样的线程的意义是?本来之所以启动新线程,就是为了在线程里执行任务,而主线程也可同时执行任务呀...
是不是应该对应pool来使用的?tpool的意义和greenpool那样,应该先开一个线程池,然后再用tpool.execute(meth, *args, **kwargs),使多个线程的meth并行执行?
bugs2k
2012-07-26
打赏
举报
回复
eventlet.tpool.execute(meth, *args, **kwargs)
Execute meth in a Python thread, blocking the current coroutine/ greenthread until the method completes.
它需要等待 meth 执行完后才能继续
python
event
let
模块学习t
pool
和green
pool
]: t
pool
.execute(my_func, thread.get_ident()) ( 'now raw thrad id:' , 140736349889472 ) In [ 13 ]: def my_func(thread_ident): ... : print ( "now raw thrad id:" , thread_ident, thread.get_ident()) ...
python
event
let
库 之一
空闲之余,开始翻译一下
event
let
库 目录在http://
event
let
.net/doc/ 一 协程产生 1.
event
let
.spawn(func, *args, **kw) 这个是发起协程(greenthread)来调用func指向的函数,并且有返回或错误 2.
event
let
....
python
event
let
超时,
Event
let
超时未退出
Why does
event
let
allow it to finish the 6 seconds, when it should exit the indentation after 5 seconds?>>> with
event
let
.Timeout(5):time.sleep(6)x = 1>>> x1解决方案
Event
let
provides...
ERROR conda.core.link:_execute(502): error occurred while installing conda-forge::setuptools 解决方案
本文主要介绍了ERROR conda.core.link:_execute(502): An error occurred while installing package mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge::setuptools-65.5.1-pyhd8ed1ab_0.FileNotFoundError...
ERROR conda.core.link:_execute(502): An error occurred while installing package
记录错误 ERROR conda.core.link:_execute(502): An error occurred while installing package:...看到网上很多出现ERROR conda.core.link:_execute(502)一般都是说environment.txt文件有中文名 然而没有
脚本语言
37,720
社区成员
34,239
社区内容
发帖
与我相关
我的任务
脚本语言
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
复制链接
扫一扫
分享
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
试试用AI创作助手写篇文章吧
+ 用AI写文章