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

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
Contributor

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 commented Sep 23, 2016

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

@gopherbot
Copy link

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

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

No branches or pull requests

6 participants