mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
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.
This commit is contained in:
parent
dc855b7b1f
commit
d74ac82df9
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue