[Python-checkins] cpython: asyncio, Tulip issue 158: Task._step() now also sets self to None if an
victor.stinner
python-checkins at python.org
Tue Mar 4 23:08:26 CET 2014
http://hg.python.org/cpython/rev/f4a2d0e4e0be
changeset: 89474:f4a2d0e4e0be
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Mar 04 23:07:08 2014 +0100
summary:
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.
files:
Lib/asyncio/tasks.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py
--- a/Lib/asyncio/tasks.py
+++ b/Lib/asyncio/tasks.py
@@ -325,7 +325,7 @@
'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:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list