From e7a138b856b21bc3db8ddb1dfe9f3fabe0dc59e8 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 8 Feb 2012 15:24:48 -0500 Subject: [PATCH] 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 --- doc/go_spec.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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.

-- 2.50.0