Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop Windows event loop hack in Python 3.8+ #573

Merged
merged 1 commit into from
Aug 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions colcon_core/executor/sequential.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ def execute(self, args, jobs, *, on_error=OnError.interrupt): # noqa: D102
if not task.done():
logger.error(f"Task '{task}' not done")
# HACK on Windows closing the event loop seems to hang after Ctrl-C
# even though no futures are pending
if sys.platform != 'win32':
# even though no futures are pending, but appears fixed in py3.8
if sys.platform != 'win32' or sys.version_info >= (3, 8):
logger.debug('closing loop')
loop.close()
logger.debug('loop closed')
else:
logger.debug('skipping loop closure')
return rc