Event loops and asynchronous I/O

Compare readiness and completion models, cancellation, buffering, and backpressure through inspectable execution traces.

10 published lessons1 module241 min of guided study
  1. 01
    Event loops and asynchronous I/Oadvanced · 10 lessons

Follow the path or begin with a question. Every lesson is open.

Your notebook0 of 10 lessons completed

Your place, at your pace. Progress is optional and saved only in this browser when available.

Inside this module

Each lesson includes an interactive lab

Event loops and asynchronous I/O

Compare readiness and completion models, cancellation, buffering, and backpressure through inspectable execution traces.

  1. 01

    Blocking, readiness, and completion are different contracts

    Trace when an I/O operation starts, when a thread may wait, and which observation actually supplies a result.

    24 min
  2. 02

    Reactor and proactor ownership

    Compare where an operation executes, which state a handler receives, and how both patterns preserve request identity.

    24 min
  3. 03

    Event-loop fairness and bounded turns

    Reason about starvation, runnable queues, cooperative yields, and the latency cost of long handlers.

    24 min
  4. 04

    Coroutines as explicit state machines

    Recover suspended state, ownership, and scheduling transitions hidden behind sequential-looking asynchronous code.

    24 min
  5. 05

    Cancellation and structured concurrency

    Design task lifetimes that survive cancellation races, join child work, and release resources only after operations become terminal.

    24 min
  6. 06

    Completion queues and buffer lifetimes

    Track request identities, completion entries, and application ownership to decide when asynchronous I/O buffers can safely return to a pool.

    26 min
  7. 07

    Zero-copy I/O and ownership

    Evaluate copy avoidance as an ownership tradeoff, with explicit reuse notifications, retained-memory budgets, and measurement boundaries.

    25 min
  8. 08

    Partial reads and write coalescing

    Preserve byte offsets across asynchronous retries, reconstruct protocol frames, and trade fewer writes against bounded buffering delay.

    22 min
  9. 09

    Asynchronous resource leaks

    Trace ownership through cancellation and shutdown, distinguish active resources from leaks, and test whether an asynchronous service reaches quiescence.

    23 min
  10. 10

    Benchmarking asynchronous I/O workloads

    Design open and closed load experiments, expose coordinated omission, and separate offered load from admission, completion, and latency boundaries.

    25 min
All engineering modules