Wow, I'm surprised it's documented as being thread unsafe in CPython, but it's good to know.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ronnie Maor Sent: Monday, October 13, 2008 1:57 PM To: Discussion of IronPython Subject: Re: [IronPython] Problem with random module in IPY 1.1.1 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 <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> wrote: Hi, 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? Thanks, Asaf _______________________________________________ Users mailing list [email protected]<mailto:[email protected]> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
_______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
