The hitchhiker's guide to asyncio
summary
Explains how the Python event loop schedules coroutines and uses the OS select call to wake when sockets are ready, demonstrates that three sequential 1s HTTP calls drop to ~1s with asyncio.gather, shows a real example creating 20 tasks with a semaphore limiting concurrency to 3 and awaiting them via TaskGroup (Python 3.11), warns that CPU‑bound coroutines block the loop and recommends thread‑pool or background tasks for heavy work.
AI-written summary · about
chapters (12)
- 0:00Introduction to asyncio
- 2:57Concurrency vs parallelism basics
- 5:44Real parallelism with multi-processing
- 7:10Threading limitations in Python
- 8:33Async IO for I/O-bound tasks
- 9:16Core concepts of asyncio
- 11:29Speeding up I/O operations
- 13:57How asyncio event loop works
- 17:49Smart waiting without threads
- 18:53Pitfalls of asyncio misuse
- 19:13Real-world asyncio example
- 21:45Q&A session








