Closed
Description
This related issue makes a case for math/rand
exporting some implementation of Source
that is concurrency safe.
Pursuant to that, this change exports LockedSource
from golang.org/x/exp/rand
. That seems like a nice start, however, with LockedSource
's attributes still being unexported and with there being no constructor-like function for instantiating a new LockedSource
, there remains no practical way to initialize variables of that type.
I want to propose the addition of a new package-level function NewLockedSource(seed uint64) Source
in golang.org/x/exp/rand
.
I'm happy to PR this myself if there's some consensus that this is a reasonable change.