summaryrefslogtreecommitdiff
path: root/Lib/asyncio/tasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/tasks.py')
-rw-r--r--Lib/asyncio/tasks.py2
1 files changed, 1 insertions, 1 deletions
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: