Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93493

Re: An asyncio example

From Terry Reedy <tjreedy@udel.edu>
Subject Re: An asyncio example
Date 2015-07-04 16:22 -0400
References <CACvLUanbTmF=gbfNbKsZO0eiWE-bPJdGO6opAuar8A2UiTX=dA@mail.gmail.com> <CACvLUakMjbuoKHvJwvcxdpKC7gBZNa18sgmWm-J13m_YQwn+6Q@mail.gmail.com> <CACvLUa==26gPW2pbdr+FGpAUO3gtnE8t3gEm=R-QT8oGDNMSRw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.292.1436041373.3674.python-list@python.org> (permalink)

Show all headers | View raw


On 7/4/2015 3:04 AM, Adam Bartoš wrote:

> 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?

I asked on pydev list and was pointed to
https://bugs.python.org/issue23057
(where treated as missing feature ).  It is desired that this stop 
immediately on Windows as on Unix.

I suggest you post your minimal example there.  User interest in an 
issue being fixed and willingness to test patches can help motivate.

Even more minimal:

import asyncio
loop = asyncio.get_event_loop()
loop.run_forever

also not interruptible,

-- 
Terry Jan Reedy

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: An asyncio example Terry Reedy <tjreedy@udel.edu> - 2015-07-04 16:22 -0400

csiph-web