Issue
I have this really small test program which does nothing apart from a executing an asyncio
event loop:
import asyncio
asyncio.get_event_loop().run_forever()
When I run this program on Linux and press Ctrl+C, the program will terminate correctly with a KeyboardInterrupt
exception. On Windows pressing Ctrl+C does nothing (tested with Python 3.4.2). A simple inifinite loop with time.sleep()
raises the KeyboardInterrupt
correctly even on Windows:
import time
while True:
time.sleep(3600)
Why does the asyncio's event loop suppress the KeyboardInterrupt on Windows?
Solution
This is a bug, sure.
See issue on python bug-tracker for the problem solving progress.
Answered By - Andrew Svetlov
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.