Antoine Pitrou <pit...@free.fr> added the comment: It turns out that the __del__ method in _threading_local.py tries to call threading.enumerate() which itself takes the _active_limbo_lock. The problem is that __del__ can be called at any point in time (because of the GC), including at a point where the same thread has already taken the lock. The obvious fix is to bypass enumerate().
(an alternate fix would be to use an RLock for _active_limbo_lock, but it could have unforeseen consequences, such as performance ones) ---------- keywords: +patch Added file: http://bugs.python.org/file15259/threading_local.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7264> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com