Skip to content

Commit

Permalink
doc/go1.7.html: no concurrent calls of math/rand methods
Browse files Browse the repository at this point in the history
A follow-on to https://golang.org/cl/24852 that mentions the
documentation clarifications.

Updates golang#16308.

Change-Id: Ic2a6e1d4938d74352f93a6649021fb610efbfcd0
Reviewed-on: https://go-review.googlesource.com/24857
Run-TryBot: Ian Lance Taylor <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Joe Tsai <[email protected]>
Reviewed-by: Josh Bleecher Snyder <[email protected]>
  • Loading branch information
ianlancetaylor committed Jul 11, 2016
1 parent fb3cf5c commit 38de5b7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions doc/go1.7.html
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
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>

Expand Down

0 comments on commit 38de5b7

Please sign in to comment.