Python Asyncio Module
Asynchronous I/O — run, sleep, gather, create_task, Queue, Lock. This category documents 13 Python asyncio module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: asyncio.run(), asyncio.sleep(), asyncio.gather(), asyncio.create_task(), asyncio.wait(), asyncio.wait_for(), asyncio.TaskGroup(), asyncio.Queue(), asyncio.Event(), asyncio.Lock(), asyncio.Semaphore(), asyncio.current_task(), asyncio.all_tasks(). asyncio.run() executes a coroutine and blocks until complete. The main entry point for asyncio programs. asyncio.sleep() pauses execution of the current coroutine for the given seconds. asyncio.gather() runs multiple coroutines concurrently and returns their results. asyncio.create_task() schedules a coroutine to run as a Task, returning a Task object. asyncio.wait() waits for a set of tasks/futures to complete. Asyncio Module belongs to the Concurrency & Networking group alongside Threading Module, Concurrent Module, Subprocess Module, Urllib Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground.