Skip to content

Commit

Permalink
[3.11] GH-78530: clarify docs for generators yielding tasks in `async…
Browse files Browse the repository at this point in the history
…io.wait` and `asyncio.as_completed` (#103748)
  • Loading branch information
kumaraditya303 authored Apr 24, 2023
1 parent dc08c7a commit 16dabf9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Doc/library/asyncio-task.rst
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ Waiting Primitives
iterable concurrently and block until the condition specified
by *return_when*.

The *aws* iterable must not be empty.
The *aws* iterable must not be empty and generators yielding tasks are not accepted.

Returns two sets of Tasks/Futures: ``(done, pending)``.

Expand Down Expand Up @@ -805,7 +805,8 @@ Waiting Primitives
.. function:: as_completed(aws, *, timeout=None)

Run :ref:`awaitable objects <asyncio-awaitables>` in the *aws*
iterable concurrently. Return an iterator of coroutines.
iterable concurrently. Generators yielding tasks are not accepted
as *aws* iterable. Return an iterator of coroutines.
Each coroutine returned can be awaited to get the earliest next
result from the iterable of the remaining awaitables.

Expand Down

0 comments on commit 16dabf9

Please sign in to comment.