Andrew Svetlov <[email protected]> added the comment:
You MUST await a future returned from `loop.run_in_executor()` to avoid the
leak.
Yuri, what should we do with the issue? I see the second similar report in the
last half of the year.
Sure, we can add weakrefs somewhere in futures._chain_future() but I pretty
sure that the proper fix is just enforcing `await` here, e.g.
1. rename existing run_in_executor() into a private _run_in_executor() function.
2. write async trampoline:
async def run_in_executor(self, executor, func, *args):
return await self._run_in_executor(executor, func, *args)
----------
nosy: -vstinner
resolution: not a bug ->
stage: resolved ->
status: closed -> open
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue38430>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com