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
1 file changed
tree: 34e92ac931239753f1db579c30045b763644cd67
  1. examples/
  2. lib/
  3. runtimes/
  4. security/
  5. services/
  6. tools/