【发布时间】:2013-04-03 11:06:21
【问题描述】:
这样的东西会很好:
from IPython.parallel import Client
dv=Client()[0]
import time
def waitprogress(n):
for i in range(n):
time.sleep(1)
global progress
progress=str(i)+'/'+str(n)
dv.block=False
dv.apply(waitprogress,10)
dv['progress']
# the command wait 10 seconds, then returns 9/10
这不起作用,因为 IPython 会等待 dv.apply 结束,然后再搜索远程实例中的进度变量。
SO 的伟大人物有什么想法吗?
【问题讨论】:
标签: parallel-processing monitoring ipython