Part 0 · Start
Chapter 0: Why concurrency is hard
Why a program that is correct one step at a time can be wrong when steps overlap, and the vocabulary the rest of the course builds on.
- A counter that is sometimes wrongOne line of code, two goroutines, and an update that disappears.2 min
- Break itRun the lost update in a simulator you control.3 min
- The idea: steps, orders and shared dataInterleavings, data races and why testing alone misses them.3 min
- In GoThe same bug on real goroutines, and Go's race detector.3 min
- In the wildWhat the Go, Python and Rust projects say about data races.4 min
- Other languagesThe same counter in C++ and Python, run and measured.2 min
- PitfallsThree ways to convince yourself the bug is not there.1 min
- Check yourselfQuestions, an exercise, and what comes next.2 min