-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: None
-
Labels:
ThreadLocalRandom is a combination of ThreadLocal and Random classes, which is isolated to the current thread. Thus, it achieves better performance in a multithreaded environment by simply avoiding any concurrent access to the Random objects.
https://www.baeldung.com/java-thread-local-random
I also had a conversation with a Oracle Java engineer that indicated that ThreadLocalRandom is preferable with new development.
- links to