Antoine Pitrou <pit...@free.fr> added the comment: This is a patch. It modifies the implementation to use intermediate dummy objects and various weakrefs. This allows to break reference cycles even when the thread state dict is still alive (because it isn't involved in the ref cycles anymore). This also has the benefit of fixing another wart, which is still present in the pure Python implementation, though (see "_threading_local keeps the local of the last stopped thread alive" in test_threading_local).
The pure Python implementation should probably be updated, or perhaps removed altogether (since the C version is always compiled anyway). ---------- keywords: +patch nosy: +gps stage: -> patch review Added file: http://bugs.python.org/file18363/threadlocal.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue3757> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com