Python code question
January 1, 2012 3:22 PM Subscribe
Can someone tell me why this bit of Python code is "thread-unsafe"?
posted by dfriedman to computers & internet (7 answers total) 3 users marked this as a favorite
I'm teaching myself Python. I stumbled across this
pseudo-random number generator.
Lines 69:75 are commented as being "thread-unsafe".
Can someone explain to me why this is considered to be "thread-unsafe"?
I've read Wikipedia's entry on "thread safety
", but I still don't understand why the lines I mention are considered to be thread-unsafe. My assumption here is that the comment is correct, given who the person identified as being the programmer is...
Thanks for any insight