New submission from Zhibin Dong <developerd...@gmail.com>:
As shown in the code, when 0 is passed to asyncio.sleep function, sometimes the program does not exit when I press <Ctrl-C>. I must press <Ctrl-C> again to close the program. However, when a number, such as 0.01, which is bigger than 0, is passed to the sleep function, the program will exit as expected when I press <Ctrl-C> just once. Is there any bug or just a wrong way to use? Thanks. ---------- components: asyncio files: SleepTest.py messages: 361939 nosy: Zhibin Dong, asvetlov, yselivanov priority: normal severity: normal status: open title: KeyboardInterrupt is ignored when await asyncio.sleep(0) type: behavior versions: Python 3.7 Added file: https://bugs.python.org/file48893/SleepTest.py _______________________________________ 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