spec: send on closed channel counts as "proceeding"

Other wordings are possible but defining this as one
of the ways to proceed means we don't have to add
language about this to the description of select.

Fixes #2825.

R=golang-dev, gri, r
CC=golang-dev
https://golang.org/cl/5643062
This commit is contained in:
Russ Cox 2012-02-08 15:24:48 -05:00
parent cf80ccd8f6
commit e7a138b856

View File

@ -3687,10 +3687,10 @@ Channel = Expression .
<p>
Both the channel and the value expression are evaluated before communication
begins. Communication blocks until the send can proceed, at which point the
value is transmitted on the channel.
begins. Communication blocks until the send can proceed.
A send on an unbuffered channel can proceed if a receiver is ready.
A send on a buffered channel can proceed if there is room in the buffer.
A send on a closed channel proceeds by causing a <a href="#Run_time_panics">run-time panic</a>.
A send on a <code>nil</code> channel blocks forever.
</p>