Go goroutines: lightweight concurrent functions
Answer: A goroutine is a function executing concurrently with other goroutines in the same address space. Prefix a function or method call with the go keyword to start one. Concurrency is not parallelism.
The goroutine model
Effective Go gives a simple model: the goroutine is a function executing concurrently with other goroutines, all in one address space.
The cost is little more than allocating stack space. Stacks start small and grow later as required.
The runtime multiplexes goroutines onto multiple OS threads. If one blocks, for example on I/O, others continue to run.
Prefix a function or method call with the go keyword to start that call in a new goroutine. When the call completes, the goroutine exits silently.
Concurrency versus parallelism
No introduction to Go is complete without a demonstration of its goroutines and channels.
In programming, concurrency is the composition of independently executing processes. Parallelism is the simultaneous execution of computations.
One way to phrase the contrast: concurrency deals with lots of things at once; parallelism does lots of things at once.
See also
Claims
- id: C1 claim: A goroutine is a function executing concurrently in the same address space. source: S1 evidence: "function executing concurrently with other goroutines in the same address space"
- id: C2 claim: The go keyword starts a call in a new goroutine. source: S1 evidence: "Prefix a function or method call with the go keyword"
- id: C3 claim: Goroutines are multiplexed onto multiple OS threads. source: S1 evidence: "Goroutines are multiplexed onto multiple OS threads"
- id: C4 claim: Concurrency composes independent processes; parallelism is simultaneous execution. source: S2 evidence: "concurrency is the composition of independently executing processes"
Sources
- [S1] Effective Go, Concurrency. Go project. https://go.dev/doc/effective_go#goroutines . License: CC-BY-4.0. Accessed 2026-11-23.
- [S2] Concurrency is not parallelism. The Go Blog. https://go.dev/blog/concurrency-is-not-parallelism . 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, Concurrency; The Go Blog, Concurrency is not parallelism. 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, Concurrency; The Go Blog, Concurrency is not parallelism. CC-BY-4.0 (https://go.dev/copyright). Copyright The Go Authors.
Cite this
iinventedlight. 2026. "Go goroutines: lightweight concurrent functions." iinventedlight Library, iil:note:few6bwq8, version of 2026-11-23. https://iinventedlight.com/library/notes/go-goroutines/. License: CC-BY-4.0.
@misc{iil_note_few6bwq8,
author = {{iinventedlight}},
title = {{Go goroutines: lightweight concurrent functions}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-23},
url = {https://iinventedlight.com/library/notes/go-goroutines/},
note = {Permanent ID iil:note:few6bwq8. 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-goroutines.schema.json (schema; CC-BY-4.0)
- go-goroutines.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-goroutines.md.