You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by GitBox <gi...@apache.org> on 2020/01/06 18:25:44 UTC

[GitHub] [zookeeper] belugabehr edited a comment on issue #1199: ZOOKEEPER-3671: Use ThreadLocalConcurrent to Replace Random and Math.…

belugabehr edited a comment on issue #1199: ZOOKEEPER-3671: Use ThreadLocalConcurrent to Replace Random and Math.…
URL: https://github.com/apache/zookeeper/pull/1199#issuecomment-571252446
 
 
   @jhuan31 If you need predictable Random, it is preferable to set a seed on the `Random` object.  For testing, the code should be written to allow for passing in a pre-configured Random object with the seed set.  One cannot extend `ThreadLocalRandom` and one cannot set a seed.
   
   https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadLocalRandom.html#setSeed-long-

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services