Go concurrency philosophy
Prefer simple, composable concurrency with explicit ownership, cancellation, and communication.
Canonical guidance
- keep concurrent components small and composable
- make ownership, cancellation, and completion explicit
- prefer ordinary tools over elaborate frameworks
Use when
- choosing between channels, mutexes, and plain sequential code
- reviewing whether a concurrency design is overbuilt
- setting team heuristics for goroutine-heavy code
Avoid
- sprawling concurrency topologies with no clear owner
- hidden background work
- cleverness that outruns observability
Preferred pattern
- start with the smallest design that makes waiting, cancellation, and ownership obvious
Anti-pattern
- treating “more goroutines” as a style goal
Explanation: This is tempting because Go makes concurrency approachable, but approachable is not the same as free.
Why
- Go’s concurrency tools work best when the design stays explicit and boring
Related pages
Sources
- Concurrency is not parallelism - Rob Pike
- Effective Go - Go Team