Skip to content

Course

Rust Async with Tokio

A production practitioner's path through async Rust — runtime behavior, task coordination, cancellation, backpressure, and the borrow errors that only appear at scale.

9 lessons

Course Q&A

Reviews

Enrolled members can rate this course.

No reviews yet.

The Runtime Mental Model

Understand futures, tasks, executors, pinning, and why async Rust behaves differently from threads.

  1. 01Async Rust Is Not Colored ThreadsBuild the correct mental model: futures are inert state machines, tasks are runtime-scheduled units, and awaiting is cooperative suspension.24mOpen
  2. 02Tokio Runtime Workers, Timers, and IO DriversLearn what the multi-thread runtime actually owns, how blocking sections interact with workers, and why runtime configuration belongs in capacity planning.23mOpen
  3. 03Pinning, Lifetimes, and the Infamous Async Borrow ErrorsDecode compiler errors about captured references, self-referential futures, non-Send tasks, and values dropped across await points.27mOpen

Coordination and Failure

Use channels, shared state, timeouts, cancellation, and structured shutdown without leaking work or deadlock.

  1. 01Channels, Queues, and Backpressure That Actually WorksChoose between mpsc, broadcast, watch, and oneshot channels while making capacity, loss, and queue growth explicit.26mOpen
  2. 02Timeouts, Cancellation, and the Shape of Clean ShutdownTreat cancellation as a first-class protocol: drop safety, timeout scopes, resource cleanup, and deterministic shutdown ordering.25mOpen
  3. 03Shared State Without Deadlock or ContentionUse ownership, message passing, async-aware locks, and narrow critical sections instead of reflexively wrapping everything in Arc and Mutex.24mOpen

Production Debugging and Capacity

Diagnose stalls, memory growth, borrow-checker friction, and backpressure failure with real production evidence.

  1. 01Observing Async Systems: Tracing, Metrics, and tokio-consoleInstrument tasks, spans, queue depth, and scheduler behavior so stalls are diagnosed from evidence rather than restarted away.23mOpen
  2. 02Debugging Stalls, Deadlocks, and Memory GrowthUse a disciplined evidence path for hung tasks, wedged workers, unbounded queues, retained futures, and cancellation-triggered leaks.26mOpen
  3. 03Production Capacity, Load Shedding, and Resilience PatternsDesign async services with bounded concurrency, admission control, retries with budgets, and explicit degradation behavior.28mOpen