summaryrefslogtreecommitdiff
path: root/doc/go_mem.html
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-06-30 15:34:22 +0200
committerOndřej Surý <ondrej@sury.org>2011-06-30 15:34:22 +0200
commitd39f5aa373a4422f7a5f3ee764fb0f6b0b719d61 (patch)
tree1833f8b72a4b3a8f00d0d143b079a8fcad01c6ae /doc/go_mem.html
parent8652e6c371b8905498d3d314491d36c58d5f68d5 (diff)
downloadgolang-upstream/58.tar.gz
Imported Upstream version 58upstream/58
Diffstat (limited to 'doc/go_mem.html')
-rw-r--r--doc/go_mem.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/go_mem.html b/doc/go_mem.html
index da45a07d7..906b858e8 100644
--- a/doc/go_mem.html
+++ b/doc/go_mem.html
@@ -1,5 +1,14 @@
<!-- The Go Memory Model -->
+<style>
+p.rule {
+ font-style: italic;
+}
+span.event {
+ font-style: italic;
+}
+</style>
+
<h2>Introduction</h2>
<p>
@@ -214,6 +223,17 @@ 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.
</p>