labs › go-concurrency · book

Go ConcurrencyFrom Fundamentals to Production

Twenty-two chapters, from the mental models through goroutines, channels and select, to shared state and the memory model, context and cancellation, and the production discipline of testing, debugging and performance, down to the scheduler itself. Every figure is measured on a named machine, and every chapter ends in an exercise whose test fails until you make it pass.

the syllabus, as a trace

Seven lanes. Twenty-two runs. Read left to right.

Each part is a lane, like a processor in go tool trace. Each chapter is a span scheduled onto its lane, and its width is its length in prose. Hover a span to read the chapter; the list below is the same data in reading order.

chapter 22 · the run

Twenty minutes. Twelve predictions. One trace.

The book ends by composing its own advice into a crawler and running it against predictions registered in writing. This is that run, as recorded.

0 min5 min10 min15 min20 min t = 562 s · the frontier drained · 639 s of zero fetches goroutines max 110 94 OS threads max 23 23 frontier depth max 4095 0 in-flight fetches max 16 0 pages fetched max 316k 316k 0 min5 min10 min15 min20 min t = 562 s · frontier drained639 s of zero fetches goroutines max 110 94 OS threads max 23 23 frontier depth max 4095 0 in-flight fetches max 16 0 pages fetched max 316k 316k