Commit a2e74478 authored by Jason Madden's avatar Jason Madden

Drop the thread's reference to the greenlet when we're done with it under Python3.4.

parent 5691db2c
......@@ -65,6 +65,13 @@ if sys.version_info[:2] >= (3, 4):
def _set_tstate_lock(self):
self._greenlet = getcurrent()
def run(self):
try:
super(Thread, self).run()
finally:
del self._greenlet # avoid ref cycles
self._stop() # mark as finished
def join(self, timeout=None):
if self._greenlet is None:
return
......
......@@ -32,7 +32,6 @@ class Thread(_Thread):
target = kwargs.pop('target')
target = wrap_error(target)
_Thread.__init__(self, target=target, **kwargs)
self.daemon = True
self.start()
......
......@@ -131,6 +131,7 @@ FLAKY test__socket_dns.py
test__socket_close.py
test__select.py
test__greenlet.py
FLAKY test__socket.py
'''.strip().split()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment