[IronPython] Problem with random module in IPY 1.1.1
ronnie.maor at gmail.com
Mon Oct 13 13:57:13 PDT 2008
problem was caused by calling random from several threads without locking.
it reproduces more easily in IPy than in CPython because of the GIL, but
it's documented as not thread safe for CPython too.
On Sun, Oct 12, 2008 at 11:27 AM, Asaf Kleinbort <asaf at itstructures.com>wrote:
> We have encountered two strange errors in the 'random' module:
> 1. At some point the random method 'getrandbits(63)' started (and
> kept) returning 0 – until we restarted the application.
> 2. The random method 'shuffle' when applied on a list kept returning
> the same ordered list. Again – restarting the application solved the problem
> An interesting remark is that issue #1 happened to us today in two
> different applications, around the same time.
> Any ideas?
> Users mailing list
> Users at lists.ironpython.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Users