Author ssoria
Recipients janssen, loewis, ssoria
Date 2010-01-11.17:43:46
SpamBayes Score 9.56062e-07
Marked as misclassified No
Message-id <>
Okay, what if I attack this problem from a "it's not thread-safe" point of view? If the callbacks are already loaded, then who knows what state the locks are in. If you replace the locking_callback while a thread already has the lock, and another thread comes in and tries to lock, it will succeed immediately, and two threads will be in the critical section.

Attaching a patch for how I think this should work.

From Bill via email:
Hmmm, well, is there a standard way to unload Python?  I could put a
__del__ method on the module which would remove the callbacks, I
suppose.  I just never heard of "unloading" a module before.
Date User Action Args
2010-01-11 17:43:49ssoriasetrecipients: + ssoria, loewis, janssen
2010-01-11 17:43:49ssoriasetmessageid: <>
2010-01-11 17:43:48ssorialinkissue7672 messages
2010-01-11 17:43:47ssoriacreate