aurbroszniowski / Rainfall-core

Rainfall is an extensible java framework to implement custom DSL based stress and performance tests
Apache License 2.0
11 stars 16 forks source link

Make the ConcurrentPseudoRandom class truly concurrent #43

Closed markhorsburgh closed 8 years ago

markhorsburgh commented 8 years ago

The problem with the previous code was that it created a ThreadLocal and then did a get in the constructing thread. That means that only one RandomFunction was ever created. All threads then use that one object, causing enormous cache line ping-ponging between cores and sockets.