The Go Memory Model
Defines happens-before, synchronization, and what concurrent Go programs may safely assume.
Defines happens-before, synchronization, and what concurrent Go programs may safely assume.
- Author: Go Team
- Authority: primary
- Kind: reference
- URL: https://go.dev/ref/mem
What it covers
- happens-before rules
- goroutine communication guarantees
- safe publication and synchronization
Why authoritative
Official reference for memory visibility and synchronization guarantees in Go.
Use when
- how does the Go memory model apply here
- is this concurrent access safe in Go
- what establishes happens-before in Go
Keywords
- memory model, happens-before, synchronization, concurrency, visibility