Demystifying AsyncIO: Building Your Own Event Loop in Python
summary
Builds an event loop from scratch in Python and actually runs a FastAPI HTTP server on it, printing a Hello World response; measures show the homemade loop is 97% slower than the CPython default while replacing the loop with uvloop 2–4x faster narrows the gap. Uses selectors, Futures, Tasks, scheduling queues, and simple benchmarks via the cpit project to compare performance and demonstrate what parts are costly and which optimizations matter.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 5:19Scheduling callbacks
- 8:50Futures
- 10:38Aseno Helpers
- 12:39AsyncIO
- 15:28Syntax
- 18:49Performance
- 23:24Questions
related talks
27m"Python’s tale of concurrency"
31mA Really Gentle Introduction to Asyncio
30mLet's get you started with asynchronous programming
29mWhat in the World is Asyncio?
01h 21mTUTORIAL: Async Python, Good it is
56mLeveraging Async and Await in Modern Python
19mUnblocking the Loop: Mastering Python's I/O Loop Monitoring
35mHow Do Python Coroutines Work?
