[Numpy-discussion] PRNGs and multi-threading

Sturla Molden sturla at molden.no
Fri Aug 21 22:09:08 EDT 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.  :-)
 

Regards,
Sturla Molden










More information about the NumPy-Discussion mailing list