◐ Shell
clean mode source ↗

bpo-30782: Allow limiting the number of concurrent tasks in asyncio.as_completed by andybalaam · Pull Request #2424 · python/cpython

See http://bugs.python.org/issue30782 - I propose adding a "limit" argument to asyncio.as_completed.

Justification is in the linked bug and my blog posts: http://www.artificialworlds.net/blog/2017/06/12/making-100-million-requests-with-python-aiohttp/

The "Allow passing a coroutine to as_completed" part may be the most controversial because it turns off checking for some types of error, but I think it is necessary to achieve what I am trying to do.