【发布时间】:2019-11-08 19:53:41
【问题描述】:
我有一个非常简单的脚本,如下:
import multiprocessing as multi
def call_other_thing_with_multi():
P = multi.Pool(3)
P.map(other_thing, range(0,5))
P.join()
def other_thing(arg):
print(arg)
return arg**2.
call_other_thing_with_multi()
当我调用它时,我的代码会永久挂起。这是在带有 python 2.7 的 Windows 上。
感谢您的指导!
【问题讨论】:
标签: python-2.7 multiprocessing