[IPython-User] Iterating async results?
Sun Jun 3 18:27:01 CDT 2012
On Sun, Jun 3, 2012 at 4:24 PM, Fernando Perez <email@example.com> wrote:
> On Sun, Jun 3, 2012 at 4:02 PM, MinRK <firstname.lastname@example.org> 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.
> IPython-User mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-User