[IPython-user] Iterator version of TaskClient.map() that returns results as they become available?

Jon Olav Vik jonovik@gmail....
Thu Feb 11 15:55:38 CST 2010


Brian Granger <ellisonbg.net <at> gmail.com> writes:

> > @tc.iparallel()   # <-- nifty feature to be written
> > def f(x):
> >     time.sleep(np.random.random())
> >     return -x
> > N = 1000
> > for result in f(range(N)):
> >     print result # or save to file, or plot a data point
> 
> Currently this is not possible, but might be in the future.  We could
> modify barrier in a slight manner to make it possible.  Could you file
> a feature request here:

Done: https://bugs.launchpad.net/ipython/+bug/520691

Thank you for your response!

Jon Olav




More information about the IPython-user mailing list