Kaydet (Commit) db74d982 authored tarafından Victor Stinner's avatar Victor Stinner

Issue #21596: asyncio.wait(): mention that the sequence of futures must not

be empty.
üst bb2fc5b2
...@@ -521,6 +521,8 @@ Task functions ...@@ -521,6 +521,8 @@ Task functions
to complete. Coroutines will be wrapped in Tasks. Returns two sets of to complete. Coroutines will be wrapped in Tasks. Returns two sets of
:class:`Future`: (done, pending). :class:`Future`: (done, pending).
The sequence *futures* must not be empty.
*timeout* can be used to control the maximum number of seconds to wait before *timeout* can be used to control the maximum number of seconds to wait before
returning. *timeout* can be an int or float. If *timeout* is not specified returning. *timeout* can be an int or float. If *timeout* is not specified
or ``None``, there is no limit to the wait time. or ``None``, there is no limit to the wait time.
......
...@@ -387,6 +387,8 @@ ALL_COMPLETED = concurrent.futures.ALL_COMPLETED ...@@ -387,6 +387,8 @@ ALL_COMPLETED = concurrent.futures.ALL_COMPLETED
def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED): def wait(fs, *, loop=None, timeout=None, return_when=ALL_COMPLETED):
"""Wait for the Futures and coroutines given by fs to complete. """Wait for the Futures and coroutines given by fs to complete.
The sequence futures must not be empty.
Coroutines will be wrapped in Tasks. Coroutines will be wrapped in Tasks.
Returns two sets of Future: (done, pending). Returns two sets of Future: (done, pending).
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment