[IPython-User] Iterating async results?

MinRK benjaminrk@gmail....
Sun Jun 3 18:27:01 CDT 2012


On Sun, Jun 3, 2012 at 4:24 PM, Fernando Perez <fperez.net@gmail.com> wrote:

> On Sun, Jun 3, 2012 at 4:02 PM, MinRK <benjaminrk@gmail.com> wrote:
> > But instead of waiting for all of the results and then iterating through
> > them, the results are awaited one by one as the iteration requires.
>
> Quick question: the wait is still done in the order they are in
> mapresult, right?  So if by chance the first element takes say 10
> minutes but all the others finish in one, the others still have to
> wait for the first to be processed?  Or does the iterator advance as
> results arrive in arbitrary order?  I seem to remember there was an
> option for that...
>

That's what Jon mentioned above as the `ordered=True|False` flag. By
default, ordering is preserved, but you can disable that and process
first-come-first-serve if you don't care about the order.


>
> Cheers,
>
> f
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120603/19964ee5/attachment.html 


More information about the IPython-User mailing list