PyDocs

Nav

Networking and Interprocess Communication

wait

asyncio

async function (source) not WASI
  • wait(aws, *, timeout=None, return_when=ALL_COMPLETED)
Wait for the Futures or Tasks given by fs to complete.

The fs iterable must not be empty.

Returns two sets of Future: (done, pending).

Usage:

    done, pending = await asyncio.wait(fs)

Note: This does not raise TimeoutError! Futures that aren't done
when the timeout occurs are returned in the second set.
Changed in 3.10, 3.11, 3.12
  • 3.10: Removed the loop parameter.
  • 3.11: Passing coroutine objects to wait() directly is forbidden.
  • 3.12: Added support for generators yielding tasks.
0 Examples
No examples for asyncio/wait.
See Also
No see-alsos for asyncio/wait
0 Notes
No notes for wait