Standardised Coroutine Concurrency in Python 3
summary
Shows how a tiny scheduler is built from generators, demonstrates a mechanical refactor into real Python 3.5+/asyncio with ensure_future, and explains why coroutines are contagious (everything transitively must be non‑blocking). Claims threads cost ~8MB each, extracts a Lucas example (first >6 digits is 103682) to exercise work, introduces the bear yield placement rule, and ships usable code (including pi-serial-asyncio in production). Ends with two working chat server demos (callback protocol and streams) and debugging tips for event loops and futures.
AI-written summary · about
chapters (36)
- 0:00Introduction
- 1:10Coroutine concurrency in Python
- 2:42Serial IO
- 3:34Python Books
- 3:55Structure
- 4:52Python
- 5:11The problem
- 7:17Concurrency vs Parallelism
- 10:23Preemptive multitasking
- 12:19Async IO
- 12:49Whats next
- 13:28Work
- 15:10Search
- 17:20Async Search
- 24:28Task
- 25:13Task Scheduler
- 29:37Prime
- 30:30Print Matches
- 31:01Prime Lucas
- 31:53Repetitive Message
- 33:19Rename
- 33:31Reorder
- 34:00Create Scheduler
- 35:58Coroutines are contagious
- 36:41Prime function
- 37:10Bear yield
- 39:19Code contagious
- 40:32Extract Coroutine
- 41:45Refactoring
- 43:43Sync Search
- 47:49Sink
- 48:18Sleep
- 48:55await
- 54:20async
- 55:25terminology
- 56:22futures
related talks
01h 00mCoroutine Concurrency in Python 3 with asyncio
59mGet to grips with asyncio in Python 3
35mHow Do Python Coroutines Work?
50mUsing Asyncio in Python 3
41mCoroutines, Async/Await, Asyncio and the Pulsar Library
31mA Really Gentle Introduction to Asyncio
57mFear and Awaiting in Async: A Savage Journey to the Heart of the Coroutine Dream
24mA Crash Course in Python 3's asyncio
