[jboss-jira] [JBoss JIRA] (JGRP-2096) Replace Math.random() with ThreadLocalRandom.current().nextX()

Bela Ban (JIRA) issues at jboss.org
Wed Aug 17 05:36:00 EDT 2016


     [ https://issues.jboss.org/browse/JGRP-2096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bela Ban resolved JGRP-2096.
----------------------------
    Resolution: Done


> Replace Math.random() with ThreadLocalRandom.current().nextX()
> --------------------------------------------------------------
>
>                 Key: JGRP-2096
>                 URL: https://issues.jboss.org/browse/JGRP-2096
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>            Priority: Optional
>             Fix For: 4.0
>
>
> {{ThreadLocalRandom.current().nextX()}} is faster than {{Math.random()}} and has no contention issues as it's thread-local only.
> {{Util.random()}} currently uses {{Math.random()}}.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list