johnyannj opened a new issue #1467: RuleExt 
(RandomRuleExt、WeightedResponseTimeRuleExt)中应该使用ThreadLocalRandom代替Random
URL: https://github.com/apache/servicecomb-java-chassis/issues/1467
 
 
   Random虽然是线程安全的,但是在多线程情况下会因为竞争导致性能下降。
   
   javadoc:
   
   Instances of java.util.Random are threadsafe. However, the concurrent use of 
the same java.util.Random instance across threads may encounter contention and 
consequent poor performance. Consider instead using 
java.util.concurrent.ThreadLocalRandom in multithreaded designs

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to