Sean Soria <bugs.pyt...@seansoria.com> added the comment:

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.

----------
keywords: +patch
Added file: http://bugs.python.org/file15829/ssl.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7672>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to