RFR (S): CR 8005926: (thread) Merge ThreadLocalRandom state into java.lang.Thread

Peter Levart peter.levart at gmail.com
Tue Jan 15 14:33:05 UTC 2013

One more thing, not related to serialization:

If a TLR reference is somehow passed from the thread that obtained it 
via TLR.current() to some other thread that did never call TLR.current() 
and this other thread calls methods on such instance (nextInt(), ...), 
it will start the random sequence from the zero seed, bypassing 
localInit() call...

Is this ok?

Regards, Peter

More information about the core-libs-dev mailing list