ConcurrencyFoundations
Concurrency foundations
Threads, race conditions, locks, atomics, condition variables, semaphores and deadlock: the primitives every "make it thread safe" interview question is built on, with step-through demos.
4 topics.
- 01FoundationReadThreads and race conditionsWhy two correct threads make a wrong program, and how to spot the three shapes of race.
- 02FoundationReadLocks and atomicsMutexes, reentrancy, read-write locks, compare-and-swap and memory visibility.
- 03Mid-levelReadCondition variables and semaphoresHow threads wait for each other without burning CPU, and why it is always while, never if.
- 04Mid-levelReadDeadlockThe four conditions, the wait-for graph, and the fixes that break each one.
More in Concurrency
The designbeyondcode digest, every Saturday
New deep dives, interview tips and site news in one short email. Free. Leave with one click.
We never sell or share your email. We only use it to send this newsletter.