[Numpy-discussion] PRNGs and multi-threading

Sturla Molden sturla@molden...
Fri Aug 21 21:09:08 CDT 2009

Robert Kern skrev:
> Although you don't really have re-entrancy issues, you will usually
> want one PRNG per thread for determinism.
I see... numpy.random.rand does not have re-entrancy issues because of 
the GIL, but I get indeterminism from the OS scheduling the threads. 
RandomState might not release the GIL either, but preserves determinism 
in presence of multiple threads. Thanks.  :-)

Sturla Molden

More information about the NumPy-Discussion mailing list