Skip to content
Contents · 8 chapters · 150 minutes

The chapters

Work through them in order. Each one explains an idea, gives you a real bug that shows it, and ends with a check that runs your fix many times.

  1. 01Waiting is not workingDinner for twenty takes two secondsthreads, processes, the GIL20 min
  2. 02Race conditionsTen croissants, fifty soldcheck-then-act, locks20 min
  3. 03Hold locks brieflyThe lock that closed the kitchencontention, critical sections15 min
  4. 04DeadlockKnife, then boarddeadlock, lock ordering20 min
  5. 05Queues: producers and consumersThe orders nobody cookedqueues, sentinels, backpressure20 min
  6. 06The event loopThe waiter who stood stillasyncio, blocking the loop20 min
  7. 07Limits and backpressureFifty orders at oncesemaphores, fan-out limits15 min
  8. 08Timeouts and cancellationThe burners that never came backtimeouts, cancellation, cleanup20 min