Commit ab5c762a authored by Robert Griesemer's avatar Robert Griesemer

spec: better wording re: receiving from closed channels

As suggested by ej@evanjones.ca.

Fixes #5604.

R=r
CC=golang-dev
https://golang.org/cl/9899043
parent 787976c7
<!--{
"Title": "The Go Programming Language Specification",
"Subtitle": "Version of May 20, 2013",
"Subtitle": "Version of May 31, 2013",
"Path": "/ref/spec"
}-->
......@@ -3301,9 +3301,8 @@ from the channel <code>ch</code>. The channel direction must permit receive oper
and the type of the receive operation is the element type of the channel.
The expression blocks until a value is available.
Receiving from a <code>nil</code> channel blocks forever.
Receiving from a <a href="#Close">closed</a> channel always succeeds,
immediately returning the element type's <a href="#The_zero_value">zero
value</a>.
A receive operation on a <a href="#Close">closed</a> channel can always proceed
immediately, yielding the element type's <a href="#The_zero_value">zero value</a>.
</p>
<pre>
......
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