Staging
v0.5.1
https://github.com/python/cpython
Revision 3414ea9ed9fce2b9ce74e8b6c7c3b4278b526685 authored by Jeffrey Yasskin on 23 February 2008, 19:40:54 UTC, committed by Jeffrey Yasskin on 23 February 2008, 19:40:54 UTC
    class RunSelfFunction(object):
        def __init__(self):
            self.thread = threading.Thread(target=self._run)
            self.thread.start()
        def _run(self):
            pass
from creating a permanent cycle between the object and the thread by having the
Thread delete its references to the object when it completes.

As an example of the effect of this bug, paramiko.Transport inherits from
Thread to avoid it.
1 parent 1beea27
History
Tip revision: 3414ea9ed9fce2b9ce74e8b6c7c3b4278b526685 authored by Jeffrey Yasskin on 23 February 2008, 19:40:54 UTC
Prevent classes like:
Tip revision: 3414ea9
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.hgtags -rw-r--r-- 3.2 KB
LICENSE -rw-r--r-- 13.4 KB
Makefile.pre.in -rw-r--r-- 36.5 KB
README -rw-r--r-- 54.2 KB
configure -rwxr-xr-x 642.5 KB
configure.in -rw-r--r-- 98.0 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 28.1 KB
setup.py -rw-r--r-- 71.8 KB

README

back to top