mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-11 19:18:28 +02:00
Refactor event loop handling to simplify logic for Windows platforms
Signed-off-by: Alexandre Pita <alexandreanpita@gmail.com>
This commit is contained in:
parent
784d798dac
commit
37b27fa233
@ -2776,9 +2776,7 @@ async def compose_up(compose: PodmanCompose, args):
|
||||
max_service_length = curr_length if curr_length > max_service_length else max_service_length
|
||||
|
||||
tasks = set()
|
||||
if sys.platform == 'win32':
|
||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||
else:
|
||||
if sys.platform != 'win32':
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.add_signal_handler(signal.SIGINT, lambda: [t.cancel("User exit") for t in tasks])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user