On Wed, 16 Nov 2022 21:12:09 GMT, Bernd <d...@openjdk.org> wrote: > Would it be easier to remove the state (singleton, thread local) caching > completely? If somebody request a new instance just seed and return it. That > might in some situations be even less seeding than once per thread and it > decreases stat sharing even more.
ThreadLocal is basically a middle path. Creating a RandomIO to for access /dev/random each time > Would it be easier to remove the state (singleton, thread local) caching > completely? If somebody request a new instance just seed and return it. That > might in some situations be even less seeding than once per thread and it > decreases stat sharing even more. that would require too many open and close of /dev/(urandom). ThreadLocal is basically the middle path. The singleton approach only needs one open and close, however it would require threads to be sync'ed to access /dev/(urandom) ------------- PR: https://git.openjdk.org/jdk/pull/11069