diff --git a/colcon_core/executor/sequential.py b/colcon_core/executor/sequential.py index 558e8409..1aab44e7 100644 --- a/colcon_core/executor/sequential.py +++ b/colcon_core/executor/sequential.py @@ -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