Engineering / advanced
Event loops and asynchronous I/O
Compare readiness and completion models, cancellation, buffering, and backpressure through inspectable execution traces.
Your route through engineering
Follow the path or begin with a question. Every lesson is open.
Your place, at your pace. Progress is optional and saved only in this browser when available.
Read / explore / reason
Inside this module
Module 01 advanced
Event loops and asynchronous I/O
Compare readiness and completion models, cancellation, buffering, and backpressure through inspectable execution traces.
- 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 - 02
Reactor and proactor ownership
Compare where an operation executes, which state a handler receives, and how both patterns preserve request identity.
24 min - 03
Event-loop fairness and bounded turns
Reason about starvation, runnable queues, cooperative yields, and the latency cost of long handlers.
24 min - 04
Coroutines as explicit state machines
Recover suspended state, ownership, and scheduling transitions hidden behind sequential-looking asynchronous code.
24 min - 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 - 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 - 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 - 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 - 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
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