commit | 2028203e7b9e42fdcaac432cebd46fcffa07c128 | [log] [tgz] |
---|---|---|
author | Asim Shankar <ashankar@google.com> | Mon Jul 07 22:48:00 2014 -0700 |
committer | Asim Shankar <ashankar@google.com> | Mon Jul 07 22:48:00 2014 -0700 |
tree | 34e92ac931239753f1db579c30045b763644cd67 | |
parent | c1386b646ef2fed6949cbb3174972e32e9d554cb [diff] |
veyron/lib/testutil: Make the source of randomness thread-safe. This fixes a bunch of races observed in the continuous build with "go test -race", introduced in https://veyron-review.googlesource.com/#/q/Ie7e0f1622c64a11fb787d95e30b62c9f264f110d That said, I'm not sure whether it is better to make testutil.Rand "thread-safe", or is it better to avoid locks there and have clients that need safety implement their own locks. Will leave that call up to the reviewer. Change-Id: I4dfbd11e6ab7e4f25c9b79364145f552a37d9286