Commit 9f03d4a3 authored by Russ Cox's avatar Russ Cox

doc/go_mem.html: close happens before receive on closed channel

R=golang-dev, gri
CC=golang-dev
https://golang.org/cl/4551042
parent 2ddcad96
<!-- The Go Memory Model -->
<style>
p.rule {
font-style: italic;
}
span.event {
font-style: italic;
}
</style>
<h2>Introduction</h2>
<p>
......@@ -213,6 +222,17 @@ the corresponding receive on <code>c</code> completes, which happens before
the <code>print</code>.
</p>
<p class="rule">
The closing of a channel happens before a receive that returns a zero value
because the channel is closed.
</p>
<p>
In the previous example, replacing
<code>c &lt;- 0</code> with <code>close(c)</code>
yields a program with the same guaranteed behavior.
</p>
<p class="rule">
A receive from an unbuffered channel happens before
the send on that channel completes.
......
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