Go Concurrency Distilled(antonz.org)
395 points by chmaynard 17 days ago | 183 comments
tl;dr: A concise reference covering Go's concurrency primitives: goroutines, channels, select, pipelines, context, wait groups, mutexes, semaphores, sync.Cond, sync.Once, sync.Pool, and atomics, with brief explanations and runnable code examples for each. Also touches on data races vs. race conditions, the race detector, the new synctest package for deterministic concurrency testing, goroutine scheduling internals, and production diagnostics via metrics, pprof profiling, and execution tracing. Positioned as a refresher rather than a beginner tutorial, and notably marketed as AI-free.
HN Discussion:
  • ↑Enthusiastic praise for Go's concurrency model as uniquely powerful
  • ~Channels remain confusing even to experienced Go developers
  • ~Article should have emphasized goroutine lifecycle/shutdown as the cardinal rule
  • •Recommends supplementing with anti-pattern resources on data races
  • ↓Prefers avoiding concurrency in favor of linear sequencer architectures