-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeProposalProposal-AcceptedProposal-FinalCommentPeriodrelease-blocker
Milestone
Description
In June 2021 I posted a series of articles about memory models, ending with an article about changes I thought we should make to the Go memory model. See https://research.swtch.com/mm especially https://research.swtch.com/gomm.
Then I opened a GitHub Discussion to discuss these changes; see #47141.
Based on that discussion, I propose the following concrete changes to the memory model:
- 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, matching C++ sequentially consistent atomics (and Java, JavaScript, Rust, Swift, C, ...)
- Document disallowed compiler optimizations.
The exact details can be viewed in pending CLs prepared for concreteness, in particular CL 381315 (memory model) and CL 381316 (library docs).
I have filed a separate proposal - #50860 - for another item that arose during that discussion, namely adding typed atomic values to sync/atomic.
bcmills, changkun, tmthrgd, beoran, pourfar and 24 more
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAgeProposalProposal-AcceptedProposal-FinalCommentPeriodrelease-blocker