Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.2.0, 4.0.0
Description
Remove global Random object in favor of ThreadLocalRandom.
ThreadLocalRandom is initialized with an internally generated seed that may not otherwise be modified. When applicable, use of ThreadLocalRandom rather than shared Random objects in concurrent programs will typically encounter much less overhead and contention.
https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadLocalRandom.html
Attachments
Attachments
Issue Links
- links to