Python asyncio
Python asyncio enables concurrent execution of coroutines using the async/await syntax. It is particularly useful for I/O-bound code like networking or file operations. Higher-level libraries like aiohttp for HTTP requests and aiomysql for MySQL database access build on top of asyncio. As compared to conventional threading from concurrent.futures.ThreadPoolExecutor, asyncio uses a single-threaded event loop to manage multiple tasks, reducing the overhead of thread management and context switching. This can lead to improved performance and scalability for I/O-bound applications. It can be appropriate to limit resource usage by controlling the number of concurrent tasks using asyncio.Semaphore or asyncio.BoundedSemaphore.
2025
- 2025-12-14 – Python asyncio OSError 24 too many open files
- 2025-10-08 – Python asyncio.run boilerplate
2024
- 2024-08-26 – Python aiohttp ResourceWarning socket
2019
- 2019-10-04 – Python flatten list of lists into list