[
https://issues.apache.org/jira/browse/ZOOKEEPER-3671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Mollitor updated ZOOKEEPER-3671:
--------------------------------------
Description:
{quote}
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.
{quote}
https://www.baeldung.com/java-thread-local-random
I've also had an exchange with an Oracle engineer where he indicated their
disdain for JDK {{Random}} in regards to its overall implementation.
> Use ThreadLocalConcurrent to Replace Random and Math.random
> -----------------------------------------------------------
>
> Key: ZOOKEEPER-3671
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3671
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: David Mollitor
> Assignee: David Mollitor
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> {quote}
> 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.
> {quote}
> https://www.baeldung.com/java-thread-local-random
> I've also had an exchange with an Oracle engineer where he indicated their
> disdain for JDK {{Random}} in regards to its overall implementation.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)