Get to grips with asyncio in Python 3
summary
Shows a hands‑built generator-based scheduler that runs cooperative coroutines over the Lucas sequence and an inefficient primality tester to demonstrate the rule that blocking calls are contagious and stall everything, fixes that by making is_prime a generator and using yield from then await, replaces bare yields with asyncio.sleep(0), then moves to real code using the asyncio event loop, create_task / ensure_future / gather, transports/protocols and a working chat server that scales to thousands of concurrent connections.
AI-written summary · about
chapters (10)
- 0:00Introduction to AsyncIO
- 2:54Concurrency vs Parallelism
- 7:27Implementing Co-routines
- 14:03Building a Custom Scheduler
- 19:11Avoiding Blocking Code
- 24:43Async and Await Keywords
- 31:08Asyncio Library Overview
- 37:12Futures and Task Management
- 44:45Event Loop and IO Events
- 48:50Transports and Protocols
related talks
01h 00mCoroutine Concurrency in Python 3 with asyncio
01h 29mStandardised Coroutine Concurrency in Python 3
40mAdvanced asyncio: Solving Real-world Production Problems
32mAdvanced asyncio: Solving Real-World Production Problems
25mThe hitchhiker's guide to asyncio
24mA Crash Course in Python 3's asyncio
35mHow Do Python Coroutines Work?
50mUsing Asyncio in Python 3
