Author socketpair
Recipients gvanrossum, socketpair, vstinner, yselivanov
Date 2015-06-28.06:30:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1435473054.25.0.727716281024.issue24523@psf.upfronthosting.co.za>
In-reply-to
Content
If I pass an list of futures/coroutines as (done, _) = asyncio.wait([...]), order of elements in `done` does NOT match order of elements in `wait`'s argument. This is not documented, and I don't know if that is a bug or not.

Also, documentation say:

Wait for the Futures and coroutine objects given by the SEQUENCE futures to complete.

Really, this should be SET, since order is not preserved. Or, sources should be patched to preserve the order. I think, it is not hard to preserve order [in asyncio code].


P.S.

For example, in Tornado, it is guaranteed (and documented) that order is preserved, so I can write

[res1, res2] = yield [fut1(), fut2()]

and it is guaranteed, that res1 - is a result of fut1()
History
Date User Action Args
2015-06-28 06:30:54socketpairsetrecipients: + socketpair, gvanrossum, vstinner, yselivanov
2015-06-28 06:30:54socketpairsetmessageid: <1435473054.25.0.727716281024.issue24523@psf.upfronthosting.co.za>
2015-06-28 06:30:54socketpairlinkissue24523 messages
2015-06-28 06:30:53socketpaircreate