Go channels: communication and synchronization
Answer: Channels are allocated with make and refer to an underlying data structure. Unbuffered channels combine communication with synchronization so two goroutines reach a known state. Pipeline stages are connected by channels.
Allocation and blocking
Effective Go explains that channels, like maps, are allocated with make. The value you get refers to an underlying data structure.
An optional integer sets the buffer size. Zero, the default, is an unbuffered or synchronous channel.
A receiver waits until data arrives.
On an unbuffered channel, the sender also waits until the receiver has taken the value.
Pipelines
The pipelines article says Go has no formal definition of a pipeline.
Informally, stages form a series connected by channels, and each stage is a group of goroutines running the same function.
A stage receives upstream values on inbound channels, does work, then sends downstream on outbound channels.
See also
Claims
- id: C1 claim: Channels are created with make and refer to an underlying data structure. source: S1 evidence: "channels are allocated with make"
- id: C2 claim: The default buffer size is zero, which is an unbuffered channel. source: S1 evidence: "The default is zero, for an unbuffered or synchronous channel"
- id: C3 claim: An unbuffered sender blocks until the receiver has received the value. source: S1 evidence: "the sender blocks until the receiver has received the value"
- id: C4 claim: A pipeline is a series of stages connected by channels. source: S2 evidence: "a pipeline is a series of stages connected by channels"
Sources
- [S1] Effective Go, Channels. Go project. https://go.dev/doc/effective_go#channels . License: CC-BY-4.0. Accessed 2026-11-23.
- [S2] Go Concurrency Patterns: Pipelines and cancellation. The Go Blog. https://go.dev/blog/pipelines . License: CC-BY-4.0. Accessed 2026-11-23.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Go project, Effective Go, Channels; The Go Blog, Go Concurrency Patterns: Pipelines and cancellation. CC-BY-4.0 (https://go.dev/copyright). Copyright The Go Authors. Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Go project, Effective Go, Channels; The Go Blog, Go Concurrency Patterns: Pipelines and cancellation. CC-BY-4.0 (https://go.dev/copyright). Copyright The Go Authors.
Cite this
iinventedlight. 2026. "Go channels: communication and synchronization." iinventedlight Library, iil:note:hn967505, version of 2026-11-23. https://iinventedlight.com/library/notes/go-channels/. License: CC-BY-4.0.
@misc{iil_note_hn967505,
author = {{iinventedlight}},
title = {{Go channels: communication and synchronization}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-23},
url = {https://iinventedlight.com/library/notes/go-channels/},
note = {Permanent ID iil:note:hn967505. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).
Extra files beside this note
These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.
- go-channels.schema.json (schema; CC-BY-4.0)
- go-channels.table.json (table; CC-BY-4.0)
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/go-channels.md.