This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: BaseEventLoop.close should shutdown executor before marking itself closed
Type: behavior Stage: resolved
Components: asyncio Versions: Python 3.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: asvetlov, cmeyer, gvanrossum, yselivanov
Priority: normal Keywords:

Created on 2016-10-17 21:54 by cmeyer, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg278829 - (view) Author: Chris Meyer (cmeyer) * Date: 2016-10-17 21:54
BaseEventLoop.close shuts down the executor associated with the event loop.

It should do that BEFORE it sets self._closed = True, otherwise any pending executor futures will attempt to 'call_soon' on the event loop when they finish, resulting in a confusing error message that the event loop is already closed.
msg415002 - (view) Author: Andrew Svetlov (asvetlov) * (Python committer) Date: 2022-03-12 17:05
loop.shutdown_default_executor() exists for it, asyncio.run() calls the method
History
Date User Action Args
2022-04-11 14:58:38adminsetgithub: 72650
2022-03-12 17:05:57asvetlovsetstatus: open -> closed

nosy: + asvetlov
messages: + msg415002

resolution: out of date
stage: resolved
2016-10-17 21:54:11cmeyercreate