A Really Gentle Introduction to Asyncio
summary
Explains why waiting for IO wastes CPU cycles (SSD latencies measured in milliseconds while CPUs run billions of cycles) and how Python uses async/await coroutines and tasks to schedule work without threads. Walks through futures, the OS select-based event loop, transports/protocols and a protobuf-backed request/reply demo. Shows a working ATM test harness built with pytest-asyncio, create_server/create_connection and subprocesses, where tests start a bank server and ATM process, send requests and assert correct balances.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 0:48Welcome
- 1:35Why Asyncio
- 4:24Concurrency
- 5:54Demo
- 9:54Futures
- 13:54Tasks
- 16:45Transports
- 18:39Protocols








