From: Russ Cox Date: Wed, 8 Feb 2012 20:24:48 +0000 (-0500) Subject: spec: send on closed channel counts as "proceeding" X-Git-Tag: weekly.2012-02-14~208 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e7a138b856b21bc3db8ddb1dfe9f3fabe0dc59e8;p=gostls13.git 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 --- diff --git a/doc/go_spec.html b/doc/go_spec.html index 8b2d515df0..64cfef5017 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -3687,10 +3687,10 @@ Channel = Expression .

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 run-time panic. A send on a nil channel blocks forever.