Skip to content

Commit 16dabf9

Browse files
[3.11] GH-78530: clarify docs for generators yielding tasks in asyncio.wait and asyncio.as_completed (#103748)
1 parent dc08c7a commit 16dabf9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Doc/library/asyncio-task.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,7 @@ Waiting Primitives
757757
iterable concurrently and block until the condition specified
758758
by *return_when*.
759759

760-
The *aws* iterable must not be empty.
760+
The *aws* iterable must not be empty and generators yielding tasks are not accepted.
761761

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

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

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

0 commit comments

Comments
 (0)