← All notes

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

Sources

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

Permanent ID: iil:note:hn967505

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.},
}

Markdown

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.

All artifact files (JSON index)

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.