Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: define how sync interacts with memory model #7948

Closed
dvyukov opened this issue May 7, 2014 · 4 comments
Closed

doc: define how sync interacts with memory model #7948

dvyukov opened this issue May 7, 2014 · 4 comments
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Milestone

Comments

@dvyukov
Copy link
Member

dvyukov commented May 7, 2014

This is related to issue #5045.

We also need to define how primitives in sync package interact with memory model. E.g.
wg.Add happens-before wg.Done, once.Do function execution happens-before any of once.Do
returns, etc.
@ianlancetaylor
Copy link
Member

Comment 1:

It would be nice if we could document in the sync package that WaitGroup.Add works like
Mutex.Lock and WaitGroup.Wait works like Mutex.Unlock.  Then we only have to change the
sync doc, not the memory model doc.

@dvyukov dvyukov added accepted Documentation Issues describing a change to documentation. labels May 7, 2014
@rsc rsc added this to the Unplanned milestone Apr 10, 2015
@glasser
Copy link
Contributor

glasser commented Sep 23, 2016

Note that Once is currently documented. WaitGroup still isn't.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/234497 mentions this issue: sync: document the happens-before guarantees made by WaitGroup.

@changkun
Copy link
Member

I think this is done via https://go.dev/cl/381316. Close and feel free to reopen if anything else is still left to do

@golang golang locked and limited conversation to collaborators Aug 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Documentation Issues describing a change to documentation. FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

6 participants