[issue23057] [Windows] asyncio: support signal handlers on Windows (feature request)

Adam Bartoš report at bugs.python.org
Tue Jul 7 21:33:58 CEST 2015


Adam Bartoš added the comment:

David Robertson: The behaviour you pointed out is a consequence of the general issue: signals on Windows aren't fully supported. Basically, they cannot interrupt the event loop when every coroutine is waiting for something. Instead, they are fired when something happens – some data are recieved or some timer reaches zero. In your case it was the connection of the client or the message it sent.

This is the right issue related to your problem. Hopefully, it will be fixed eventually. A current workaround is to schedule a task which periodically sleeps for an amount of time. For example, if it allways sleeps for one second, then you will wait for KeyboardInterrupt at most one second.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23057>
_______________________________________


More information about the Python-bugs-list mailing list