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

Open
dvyukov opened this issue May 7, 2014 · 3 comments
Open

doc: define how sync interacts with memory model #7948

dvyukov opened this issue May 7, 2014 · 3 comments
Labels
Milestone

Comments

@dvyukov
Copy link
Member

@dvyukov 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
Contributor

@ianlancetaylor ianlancetaylor commented May 7, 2014

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.
@glasser
Copy link
Contributor

@glasser glasser commented Sep 23, 2016

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

@gopherbot
Copy link

@gopherbot gopherbot commented May 18, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.