asyncio Exposed: Beyond the Happy Path
summary
Asyncio is not magic — the event loop decides when coroutines run, create_task yields real concurrency while await can serialize work, and blocking libraries (e.g. requests) freeze the loop so a 2s timeout can appear only after 20s. Practical fixes shown: switch to async-aware HTTP clients or offload blocking calls to threads (run_in_executor), trace long-running coroutines locally with the loop in debug mode, and add targeted monitoring to catch the silent failures before production.
AI-written summary · about
chapters (12)
- 0:00Introduction and setup
- 1:06Speaker background and motivation
- 2:15Why asyncio and its challenges
- 4:24Basic asyncio concepts
- 5:51How coroutines work under the hood
- 7:15Silent bugs in asyncio
- 9:42Common asyncio performance mistakes
- 11:27Blocking the event loop
- 14:02Timeouts and event loop impact
- 16:33Debugging asyncio issues
- 17:56Why understanding asyncio matters
- 19:00Key takeaways and summary
