]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-42140: Improve asyncio.wait function (GH-22938)
authorDiogo Dutra <diogodutradamata@gmail.com>
Tue, 10 Nov 2020 22:12:52 +0000 (19:12 -0300)
committerGitHub <noreply@github.com>
Tue, 10 Nov 2020 22:12:52 +0000 (14:12 -0800)
commit7e5ef0a5713f968f6e942566c78bf57ffbef01de
treee7dcc62f4df41be1087ef1f313a132dd401161e2
parenta13b26cac1519dad7bbc8651de7b826df7389d75
bpo-42140: Improve asyncio.wait function (GH-22938)

# Improve asyncio.wait function

The original code creates the futures set two times.
We can create this set before, avoiding the second creation.

This new behaviour [breaks the aiokafka library](https://github.com/aio-libs/aiokafka/pull/672), because it gives an iterator to that function, so the second iteration become empty.

Automerge-Triggered-By: GH:1st1
Lib/asyncio/tasks.py
Lib/test/test_asyncio/test_tasks.py
Misc/NEWS.d/next/Library/2020-10-24-04-02-36.bpo-42140.miLqvb.rst [new file with mode: 0644]