Skip to content
BytePatterns

Concurrency

Threads, locks and races — watch the interleavings that bite.

Concurrency progress0 / 10
  1. Threads vs ProcessesShared memory, or a wall between you.4m
  2. Race ConditionsTwo readers, one write survives.5m
  3. Locks and MutexesOne thread inside, everybody else waits.5m
  4. DeadlockEveryone holding what the next one needs.5m
  5. Thread PoolsHire the workers once, reuse them all day.4m
  6. Producer and ConsumerA bounded belt between the two sides.5m
  7. Async and the Event LoopOne thread, politely taking turns.5m
  8. Atomic OperationsIndivisible: nobody sees it half-done.4m
  9. SemaphoresCount the permits, not the holders.4m
  10. Designing Thread-Safe CodeDon't share, freeze it, or guard it.5m