summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2010-07-14 16:09:22 -0700
committerRobert Griesemer <gri@golang.org>2010-07-14 16:09:22 -0700
commit28da89bfe8135dc7164dcf2a20c10a9b1150f715 (patch)
tree2a8d7f7a0b65635cf78bc87114277a6da8c2be97 /doc
parent6c497e5add7057fcf219d21da8d3b060e0c3b202 (diff)
downloadgo-28da89bfe8135dc7164dcf2a20c10a9b1150f715.tar.gz
go spec: clarification of channel close()
R=r, rsc CC=golang-dev http://codereview.appspot.com/1766042
Diffstat (limited to 'doc')
-rw-r--r--doc/go_spec.html17
1 files changed, 10 insertions, 7 deletions
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 598bc928d..13b3a9070 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -1,5 +1,5 @@
<!-- title The Go Programming Language Specification -->
-<!-- subtitle Version of July 12, 2010 -->
+<!-- subtitle Version of July 14, 2010 -->
<!--
TODO
@@ -4347,14 +4347,17 @@ BuiltinArgs = Type [ "," ExpressionList ] | ExpressionList .
<h3 id="Close_and_closed">Close and closed</h3>
<p>
-For a channel <code>c</code>, the predefined function <code>close(c)</code>
-marks the channel as unable to accept more
-values through a send operation. After any previously
+For a channel <code>c</code>, the built-in function <code>close(c)</code>
+marks the channel as unable to accept more values through a send operation;
+values sent to a closed channed are ignored.
+After calling <code>close</code>, and after any previously
sent values have been received, receive operations will return
-the zero value for the channel's type. After at least one such zero value has been
+the zero value for the channel's type without blocking.
+After at least one such zero value has been
received, <code>closed(c)</code> returns true.
</p>
+
<h3 id="Length_and_capacity">Length and capacity</h3>
<p>
@@ -4560,10 +4563,10 @@ func recover() interface{}
</pre>
<p>
-<font color=red>TODO: Most of this text could move to the respective
+<span class="alert">TODO: Most of this text could move to the respective
comments in <code>runtime.go</code> once the functions are implemented.
They are here, at least for now, for reference and discussion.
-</font>
+</span>
</p>
<p>