Go Concurrency Patterns: Pipelines and cancellation
Practical patterns for pipeline stages, goroutine shutdown, fan-out/fan-in, and cancellation.
Practical patterns for pipeline stages, goroutine shutdown, fan-out/fan-in, and cancellation.
- Author: Sameer Ajmani
- Authority: primary
- Kind: blog
- URL: https://go.dev/blog/pipelines
What it covers
- pipeline structure
- goroutine lifecycle in pipelines
- cancellation and channel shutdown
Why authoritative
Core Go concurrency guidance for pipelines and coordinated shutdown.
Use when
- how should this Go pipeline shut down
- how do I cancel pipeline stages in Go
- is this goroutine pipeline pattern safe
Keywords
- pipelines, cancellation, fan-out, fan-in, goroutines