diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2014-03-04 22:07:08 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2014-03-04 22:07:08 (GMT) |
commit | d74ac82df9cda264c120379a41e7add5d64b9d01 (patch) | |
tree | 210d5f4cc398886dd3c80bfdc64f1400b2da4a09 /Lib/asyncio/tasks.py | |
parent | dc855b7b1f6c7e9a9eb73bcf2b50619f2dfaf703 (diff) | |
download | cpython-d74ac82df9cda264c120379a41e7add5d64b9d01.zip cpython-d74ac82df9cda264c120379a41e7add5d64b9d01.tar.gz cpython-d74ac82df9cda264c120379a41e7add5d64b9d01.tar.bz2 |
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.
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r-- | Lib/asyncio/tasks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/asyncio/tasks.py b/Lib/asyncio/tasks.py index 19fa654..0967e7e 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: |