I'm writing a CPU intensive application built with Akka 2 Futures. I don't need Actors currently but I'm not reluctant to use them.
Several computations enclosed in futures must invoke a random generator, very often. I'm afraid that if I used a classic concurrent RNG, it will become a choking point and I will lose scalability.
What is the most fast/simple way of having a Random generator per thread in the ExecutionContext
?
Is there a way to initialize them all with a different seed (but known in advance) such a to repeat experiment ?
Use akka.jsr166y.ThreadLocalRandom
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With