]> Cypherpunks repositories - gostls13.git/commit
doc: update Go memory model
authorRuss Cox <rsc@golang.org>
Wed, 26 Jan 2022 21:42:05 +0000 (16:42 -0500)
committerRuss Cox <rsc@golang.org>
Sat, 4 Jun 2022 18:42:07 +0000 (18:42 +0000)
commit865911424d509184d95d3f9fc6a8301927117fdc
treebabca2f61d88b20c262c3410ad79ca42fc531650
parentfc66cae490a0cd8b8cefefbc0ace7c3fb030f779
doc: update Go memory model

Following discussion on #47141, make the following changes:

- Document Go's overall approach.
- Document that multiword races can cause crashes.
- Document happens-before for runtime.SetFinalizer.
- Document (or link to) happens-before for more sync types.
- Document happens-before for sync/atomic.
- Document disallowed compiler optimizations.

See also https://research.swtch.com/gomm for background.

Fixes #50859.

Change-Id: I17d837756a77f4d8569f263489c2c45de20a8778
Reviewed-on: https://go-review.googlesource.com/c/go/+/381315
Reviewed-by: Ian Lance Taylor <iant@google.com>
doc/go_mem.html