On 1/19/22 14:33, Ali Çehreli wrote:

> Random rnd;
>
> shared static this() {
>    rnd = Random(unpredictableSeed);
> }

But that's a mistake: If rnd is thread-local like that, it should be initialized in a 'static this' (not 'shared static this'). Otherwise, only the main thread's 'rnd' would be randomized, which is the only thread that executes 'shared static this' blocks.

Ali

Reply via email to