Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
646 views
in Technique[技术] by (71.8m points)

deadlock - 使用很多`pool.Group`实例是否有开销(可能是递归的)?(Is there any overhead to using a lot of `pool.Group` instances (possibly in recursion)?)

In a relatively large system using gevent I'm encountering a deadlock situation (the python process just freezes mid log, but no cpu is used).

(在使用gevent的相对较大的系统中,我遇到了死锁的情况(python进程仅冻结了中间日志,但未使用cpu)。)

I can't reproduce this reliably, but from the last few months it seems that the probability for this rises with the amount of nested pool.Group instantiations.

(我无法可靠地重现此错误,但是从最近几个月开始,这种可能性似乎随着嵌套pool.Group实例化的数量而pool.Group 。)

By nested I mean that I use the group to map some functions, and these functions I'm again doing a map using a new pool.Group .

(嵌套是指我使用组来映射一些函数,而这些函数又是使用新的pool.Group进行映射。)

Is there any limitation to creating pool.Group instances that I should be aware of?

(我应该注意的创建pool.Group实例是否有任何限制?)

Is there any difference from holding a global one and reusing it?

(与持有全球性和重复使用全球性有什么区别吗?)

(the nesting level is probably in the order of 10)

((嵌套级别可能约为10))

  ask by Uri translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...