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: effective go semaphore example violates memory model #5023
Comments
This issue was closed by revision 9dfcfb9. Status changed to Fixed. |
It's 2015 already and this issue is declared "Fixed" (and even closed) but how come the example on Effective Go is still the wrong one? |
@kimkhanh unless I mis-understood what you're asking, I believe this link should be relevant https://golang.org/doc/go1.3#memory |
Sorry, I didn't know about that. How stupid I am to refer to a stale issue. It gets really confusing when it comes to memory model let alone multiple changes to it in different versions of the language. So does that means the quote from Dmitry: "It's perfectly fine to allow any code to hoist above [a buffered] chan send, or to sink below [a buffered] chan receive." is ineffective now and go compiler(s) is not allowed to reorder statements when it comes to the same situation with buffered channels? |
The text was updated successfully, but these errors were encountered: