A gentle introduction to asyncio
summary
Covers Python 3.4’s asyncio as a concrete replacement for older async approaches, explains generators-as-coroutines, futures/tasks and the event loop APIs, builds a working echo server/client using stream reader/writer pairs and shows it handling many concurrent connections without threads, compares to Twisted/Gevent and notes Windows IOCP support, points to Tulip/Trollius backports and Autobahn WebSocket ports, and demonstrates that the example code runs end-to-end.
AI-written summary · about
chapters (12)
- 0:00Introduction
- 3:51Async I/O concepts
- 7:27Scaling and trade-offs
- 10:56Threading and processes
- 13:57Python concurrency history
- 18:47The Twisted framework
- 23:51Asyncio design goals
- 26:52Event loop internals
- 33:20Generators and yield from
- 40:26Coroutines and futures
- 47:55Transports and streams
- 54:56Conclusion and resources
related talks
31mA Really Gentle Introduction to Asyncio
25mThe hitchhiker's guide to asyncio
01h 21mTUTORIAL: Async Python, Good it is
01h 29mStandardised Coroutine Concurrency in Python 3
41mCoroutines, Async/Await, Asyncio and the Pulsar Library
23mPractical usage of asyncio
56mLeveraging Async and Await in Modern Python
32mEnhancing AsyncIO for Complex Applications
