[issue33533] Provide an async-generator version of as_completed

Hrvoje Nikšić report at bugs.python.org
Fri Oct 26 04:57:34 EDT 2018


Hrvoje Nikšić <hniksic at gmail.com> added the comment:

I didn't start working on the PR, so please go ahead if you're interested.

One small suggestion: If you're implementing this, please note that the proof-of-concept implementation shown in the description is not very efficient because each call to `wait` has to iterate over all the futures (which can be potentially large in number) to set up and tear down the done callbacks on each one. A more efficient implementation would set up the callbacks only once - see https://stackoverflow.com/a/51403277/1600898 for an example.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33533>
_______________________________________


More information about the Python-bugs-list mailing list