From: Rob Pike
Date: Wed, 31 Jul 2013 21:12:32 +0000 (+1000)
Subject: spec: clarify a couple of issues about channels
X-Git-Tag: go1.2rc2~859
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=bd65404eef75fb7e37e50cb70721fe707f346792;p=gostls13.git
spec: clarify a couple of issues about channels
1. They are FIFOs.
2. They are safe for concurrent access.
Fixes #5911.
R=golang-dev, dvyukov, adg
CC=golang-dev
https://golang.org/cl/11549043
---
diff --git a/doc/go_spec.html b/doc/go_spec.html
index 3f6ea8668c..f582231c50 100644
--- a/doc/go_spec.html
+++ b/doc/go_spec.html
@@ -4126,6 +4126,20 @@ A send on a closed channel proceeds by causing a run-
A send on a nil
channel blocks forever.
+
+Channels act as first-in-first-out queues.
+For example, if a single goroutine sends on a channel values
+that are received by a single goroutine, the values are received in the order sent.
+
+
+
+A single channel may be used for send and receive
+operations and calls to the built-in functions
+cap
and
+len
+by any number of goroutines without further synchronization.
+
+
ch <- 3