Maor Kleinberger <kma...@gmail.com> added the comment:

This behaved similarly on my machine, also ubuntu. But it also happened (less 
often) with small numbers, like sleep(0.0000000000000000000001).

Also, I tried it on my windows 10 and experienced another unexpected behavior - 
only when using sleep(0), Ctrl-C would not work *at all* from time to time. 
Most of the times it would stop the program immediately. This also happened 
when using 0.0000000000000000000001 instead of 0.

Unless 0.0000000000000000000001 turns into 0 somewhere along the way, I'd 
suspect that there is a piece of code inside asyncio's core that doesn't handle 
interrupting correctly (both on linux and windows), and using sleep with small 
numbers just makes it much more probable for this piece of code to be running 
when the Ctrl-C signal is sent.

I'll try to dig in more.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39622>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to