New submission from Antoine Pitrou <pit...@free.fr>: When you use an RLock from a thread which wasn't created through the high-level `threading` API (but, for example, using thread.start_new_thread()), the RLock creates a DummyThread object by calling current_thread(), and that DummyThread is immortal (as well as its attributes etc.). This implementation wart can easily lead to reference leaks for unsuspecting users.
One simple solution is not to call current_thread() in RLock, but use get_ident() instead. Patch attached. ---------- components: Library (Lib) files: rlock_leak.patch keywords: patch messages: 95029 nosy: pitrou priority: normal severity: normal stage: patch review status: open title: RLocks leak references when used in raw threads type: resource usage versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file15287/rlock_leak.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7282> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com