]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.7.html: no concurrent calls of math/rand methods
authorIan Lance Taylor <iant@golang.org>
Mon, 11 Jul 2016 04:47:56 +0000 (21:47 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 11 Jul 2016 17:19:26 +0000 (17:19 +0000)
A follow-on to https://golang.org/cl/24852 that mentions the
documentation clarifications.

Updates #16308.

Change-Id: Ic2a6e1d4938d74352f93a6649021fb610efbfcd0
Reviewed-on: https://go-review.googlesource.com/24857
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
doc/go1.7.html

index 2a2675e98aa9b43ea5dafc346fe20bd027b3a6bb..6605e4b36611b3ec56599a0200040beae01d9da1 100644 (file)
@@ -793,6 +793,16 @@ The
 now produce a pseudo-random stream of bytes that is consistent and not
 dependent on the size of the input buffer.
 </p>
+
+<p>
+The documentation clarifies that
+Rand's <a href="/pkg/math/rand/#Rand.Seed"><code>Seed</code></a>
+and <a href="/pkg/math/rand/#Rand.Read"><code>Read</code></a> methods
+are not safe to call concurrently, though the global
+functions <a href="/pkg/math/rand/#Seed"><code>Seed</code></a>
+and <a href="/pkg/math/rand/#Read"><code>Read</code></a> are (and have
+always been) safe.
+</p>
 </dd>
 </dl>