]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] GH-78530: clarify docs for generators yielding tasks in `asyncio.wait` and...
authorKumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
Mon, 24 Apr 2023 09:03:12 +0000 (14:33 +0530)
committerGitHub <noreply@github.com>
Mon, 24 Apr 2023 09:03:12 +0000 (14:33 +0530)
Doc/library/asyncio-task.rst

index 02fc38495879ccae83e435bf59cc3e35747179f7..bfefe8e3815b8536e16d108649f742bb3a559ea9 100644 (file)
@@ -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)``.
 
@@ -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.