Commit a4380927 authored by Rob Pike's avatar Rob Pike

doc/go1.3.html: explain the change to the memory model

LGTM=iant, rsc
R=rsc, iant, mtj
CC=golang-codereviews
https://golang.org/cl/80260044
parent 881d693c
...@@ -46,11 +46,12 @@ windows 2000 removed (CL 74790043) ...@@ -46,11 +46,12 @@ windows 2000 removed (CL 74790043)
<h2 id="memory">Changes to the memory model</h2> <h2 id="memory">Changes to the memory model</h2>
<p> <p>
TODO: The Go 1.3 memory model <a href="https://codereview.appspot.com/75130045">adds a new rule</a>
early go documentation suggested using a channel as a semaphore like this: (previous example). concerning sending and receiving on buffered channels,
the go memory model has been updated to make explicit that this idiom is allowed. (new example). to make explicit that a buffered channel can be used as a simple
the previous example is also correct, just requiring needless func init work. semaphore, using a send into the
(CL 75130045) channel to acquire and a receive from the channel to release.
This is not a language change, just a clarification about an expected property of communication.
</p> </p>
<h2 id="impl">Changes to the implementations and tools</h2> <h2 id="impl">Changes to the implementations and tools</h2>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment