Eryk Sun added the comment:
It's simple to fix this in Python 3 on Windows. PyErr_SetInterrupt in
Modules/signalmodule.c needs the following addition:
#ifdef MS_WINDOWS
SetEvent(sigint_event);
#endif
In the main thread on Windows, time.sleep() waits on this event.
On Unix, time.sleep() uses select(). We could interrupt it by signaling the
process, or explicitly the main thread, via kill() or pthread_kill(). See issue
21895 for a related discussion.
----------
nosy: +eryksun
versions: +Python 3.6, Python 3.7
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue29926>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com