mirror of https://github.com/golang/go.git
doc/go1.7.html: no concurrent calls of math/rand methods
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>
This commit is contained in:
parent
fb3cf5c686
commit
38de5b71f2
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue