]> Cypherpunks repositories - gostls13.git/commitdiff
spec: send on closed channel counts as "proceeding"
authorRuss Cox <rsc@golang.org>
Wed, 8 Feb 2012 20:24:48 +0000 (15:24 -0500)
committerRuss Cox <rsc@golang.org>
Wed, 8 Feb 2012 20:24:48 +0000 (15:24 -0500)
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

doc/go_spec.html

index 8b2d515df0eb3f9cb0f022d0f4ea2d428785ef7e..64cfef501727cca0aec5c645ba424067b0303e06 100644 (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>