Skip to content

Commit db74d98

Browse files
committed
Issue #21596: asyncio.wait(): mention that the sequence of futures must not
be empty.
1 parent bb2fc5b commit db74d98

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Doc/library/asyncio-task.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@ Task functions
521521
to complete. Coroutines will be wrapped in Tasks. Returns two sets of
522522
:class:`Future`: (done, pending).
523523

524+
The sequence *futures* must not be empty.
525+
524526
*timeout* can be used to control the maximum number of seconds to wait before
525527
returning. *timeout* can be an int or float. If *timeout* is not specified
526528
or ``None``, there is no limit to the wait time.

Lib/asyncio/tasks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ def _wakeup(self, future):
387387
def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED):
388388
"""Wait for the Futures and coroutines given by fs to complete.
389389
390+
The sequence futures must not be empty.
391+
390392
Coroutines will be wrapped in Tasks.
391393
392394
Returns two sets of Future: (done, pending).

0 commit comments

Comments
 (0)