diff options
Diffstat (limited to 'doc/go_mem.html')
-rw-r--r-- | doc/go_mem.html | 20 |
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 <- 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> |