From: Victor Stinner Date: Tue, 4 Mar 2014 22:07:08 +0000 (+0100) Subject: asyncio, Tulip issue 158: Task._step() now also sets self to None if an X-Git-Tag: v3.4.1rc1~233^2~145 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d74ac82df9cda264c120379a41e7add5d64b9d01;p=thirdparty%2FPython%2Fcpython.git asyncio, Tulip issue 158: Task._step() now also sets self to None if an exception is raised. self is set to None to break a reference cycle. --- diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 19fa654edbed..0967e7e62839 100644 --- a/Lib/asyncio/tasks.py +++ b/Lib/asyncio/tasks.py @@ -325,7 +325,7 @@ class Task(futures.Future): 'Task got bad yield: {!r}'.format(result))) finally: self.__class__._current_tasks.pop(self._loop) - self = None + self = None # Needed to break cycles when an exception occurs. def _wakeup(self, future): try: