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


Groups > comp.lang.python > #93493

Re: An asyncio example

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'patches': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'example:': 0.11; 'jan': 0.11; 'def': 0.14; 'suggest': 0.15; 'willingness': 0.15; 'adam': 0.16; 'async': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'seconds.': 0.16; 'wrote:': 0.16; 'pointed': 0.18; 'skip:l 30': 0.18; 'windows': 0.20; 'bug?': 0.22; 'occurs': 0.22; 'am,': 0.23; '(where': 0.23; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'feature': 0.24; 'url:bugs': 0.24; 'example': 0.25; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'asked': 0.28; "doesn't": 0.28; 'terry': 0.29; 'there.': 0.30; 'minimal': 0.31; 'fixed': 0.31; 'post': 0.32; 'url:python': 0.33; 'windows.': 0.33; 'to:addr :python-list': 0.35; 'list': 0.35; 'being': 0.36; 'url:org': 0.36; 'subject:: ': 0.37; 'desired': 0.37; 'missing': 0.37; 'instead': 0.38; 'received:org': 0.38; 'test': 0.39; 'to:addr:python.org': 0.39; 'your': 0.60; 'even': 0.61; 'more': 0.62; 'interest': 0.64; 'await': 0.76; 'interrupt': 0.91; 'received:fios.verizon.net': 0.91
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Terry Reedy <tjreedy@udel.edu>
Subject Re: An asyncio example
Date Sat, 4 Jul 2015 16:22:41 -0400
References <CACvLUanbTmF=gbfNbKsZO0eiWE-bPJdGO6opAuar8A2UiTX=dA@mail.gmail.com> <CACvLUakMjbuoKHvJwvcxdpKC7gBZNa18sgmWm-J13m_YQwn+6Q@mail.gmail.com> <CACvLUa==26gPW2pbdr+FGpAUO3gtnE8t3gEm=R-QT8oGDNMSRw@mail.gmail.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding quoted-printable
X-Gmane-NNTP-Posting-Host pool-98-114-97-173.phlapa.fios.verizon.net
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1
In-Reply-To <CACvLUa==26gPW2pbdr+FGpAUO3gtnE8t3gEm=R-QT8oGDNMSRw@mail.gmail.com>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.292.1436041373.3674.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1436041373 news.xs4all.nl 2843 [2001:888:2000:d::a6]:57229
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:93493

Show key headers only | 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