Course
Python Async: asyncio & Concurrency
Async Python for real production workloads — the event loop, tasks, cancellation, backpressure, structured concurrency, and the failure modes that make async code painful when the mental model is wrong.
Reviews
Enrolled members can rate this course.
No reviews yet.
The Event Loop Mental Model
How asyncio really schedules work, what tasks are, and why cancellation is a design feature rather than an error path.
- 01The Event Loop Is a Scheduler, Not a Thread PoolThe single-threaded cooperative scheduling model behind asyncio, what actually happens at await, and why one blocking call can freeze a service.22mOpen
- 02Tasks, create_task, and the Lifecycle You OwnHow coroutines become scheduled tasks, when fire-and-forget is safe, and why unreferenced tasks and hidden exceptions are production incidents waiting to happen.21mOpen
- 03Cancellation and Timeouts Without Resource LeaksHow CancelledError travels through coroutines, how timeout semantics changed with asyncio.timeout, and how to write cleanup that survives real shutdowns.24mOpen
Building Real Async Systems
Concurrency limits, backpressure, network clients, and safe interop with threads and processes.
- 01Backpressure: Semaphores, Queues, and Saying NoWhy unbounded concurrency collapses services, how semaphores and queues shape load, and how to expose overload instead of hiding it until the process dies.23mOpen
- 02Async Network I/O That Survives the InternetHTTP client lifecycle, connection pooling, streaming, retries, and the socket-level mistakes that turn partial failures into cascading outages.23mOpen
- 03Mixing asyncio with Threads, Processes, and Legacy Blocking CodeWhen to use asyncio.to_thread, when to use ProcessPoolExecutor, how loop.run_in_executor really works, and how to cross the sync-async boundary safely.22mOpen
Production Async
Structured concurrency, debugging classic async bugs, and the operational habits that keep services predictable under load.
- 01Structured Concurrency with TaskGroupWhy task lifetimes should be scoped, how asyncio.TaskGroup changes error semantics, and how to structure supervisors and request fan-out so nothing escapes.21mOpen
- 02The Classic Async Bugs: Races, Reentrancy, and Lock AbuseThe bugs senior teams keep rediscovering: mutable shared state, check-then-act races, deadlocks, starvation, and context variables that leak or vanish.25mOpen
- 03Testing, Observability, and Debugging Async in ProductionHow to test time-dependent async code, instrument the loop, reproduce races, and read the signals that reveal blocking, starvation, and cancellation bugs.24mOpen