asyncio icon indicating copy to clipboard operation
asyncio copied to clipboard

SIGINT is not correctly handled in Windows

Open stefanotorresi opened this issue 9 years ago • 2 comments

in Windows, CTRL+C doesn't terminate this script:

#!/usr/bin/env python

import asyncio

try:
    asyncio.get_event_loop().run_forever()
except KeyboardInterrupt:
    asyncio.get_event_loop().stop()

also see #191

stefanotorresi avatar Aug 30 '16 19:08 stefanotorresi

Are there any news or known workarounds for this? I'm having the same problem

lukkm avatar Apr 18 '17 14:04 lukkm

@lukkm Here is a workaround: https://stackoverflow.com/questions/24774980/why-cant-i-catch-sigint-when-asyncio-event-loop-is-running/24775107#24775107

gera2ld avatar Apr 29 '17 07:04 gera2ld