.. currentmodule:: asyncio
This page lists all high-level async/await enabled asyncio APIs.
Utilities to run asyncio programs, create Tasks, and await on multiple things with timeouts.
await :func:`sleep`
Sleep for a number of seconds.
await :func:`gather`
Schedule and wait for things concurrently.
await :func:`wait_for`
Run with a timeout.
await :func:`shield`
Shield from cancellation.
await :func:`wait`
Monitor for completion.
Examples
Queues should be used to distribute work amongst multiple asyncio Tasks, implement connection pools, and pub/sub patterns.
Examples
Utilities to spawn subprocesses and run shell commands.
await :func:`create_subprocess_exec`
Create a subprocess.
await :func:`create_subprocess_shell`
Run a shell command.
Examples
High-level APIs to work with network IO.
await :func:`open_connection`
Establish a TCP connection.
await :func:`open_unix_connection`
Establish a Unix socket connection.
await :func:`start_server`
Start a TCP server.
await :func:`start_unix_server`
Start a Unix socket server.
Examples
Threading-like synchronization primitives that can be used in Tasks.
Examples
asyncio.TimeoutError is unrelated
to the built-in :exc:`TimeoutError` exception.
Examples
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。