From d74ac82df9cda264c120379a41e7add5d64b9d01 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Tue, 4 Mar 2014 23:07:08 +0100 Subject: [PATCH] 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. --- Lib/asyncio/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 19fa654edb..0967e7e628 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: -- 2.40.0