Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7743f6 commit 10a03a0Copy full SHA for 10a03a0
1 file changed
Lib/asyncio/tasks.py
@@ -273,6 +273,7 @@ def __eager_start(self):
273
finally:
274
if self.done():
275
self._coro = None
276
+ self = None # Needed to break cycles when an exception occurs.
277
else:
278
_register_task(self)
279
@@ -365,6 +366,8 @@ def __step_run_and_handle_result(self, exc):
365
366
new_exc = RuntimeError(f'Task got bad yield: {result!r}')
367
self._loop.call_soon(
368
self.__step, new_exc, context=self._context)
369
+ finally:
370
371
372
def __wakeup(self, future):
373
try:
0 commit comments