On Sat, Jul 4, 2015 at 8:45 AM, Adam Bartoš <dre...@gmail.com> wrote:
> On Fri, Jul 3, 2015 at 7:38 PM, Adam Bartoš <dre...@gmail.com> wrote: >>> >>>> Ian Kelly: >>>> >>> >> 2) In the blocked situaction even KeyboardInterrupt doesn't break the >>>> loop >>>> >>> >> is that desired behavior? And why? >>>> >>> > >>>> >>> > I don't think so. When I tried this locally (using Python 3.4.0, so >>>> >>> > replacing "async def" with "def" and "await" with "yield from" and >>>> >>> > "loop.create_task" with "asyncio.async") pressing Ctrl-C did interrupt >>>> >>> > the loop >>>> >>> > >>>> >>> Ok, I'll try to get more information and I'll eventually raise an issue. >>>> >>> >>> I tried it on Python 3.4.1 and Ctrl-C doesn't interrupt the loop. Maybe >>> it has something to do with the fact I'm on Windows. >> >> >> Please try with 3.4.3, which has further asyncio changes. >> > > I originally tried with 3.5.0b2. > > This is a minimal example: import asyncio async def wait(): await asyncio.sleep(5) loop = asyncio.get_event_loop() loop.run_until_complete(wait()) Ctrl-C doesn't interrupt the waiting, instead KeyboardInterrupt occurs after those five seconds. It's 3.5.0b2 on Windows. Is it a bug?
-- https://mail.python.org/mailman/listinfo/python-list