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: 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 Subject: Re: An asyncio example Date: Sat, 4 Jul 2015 16:22:41 -0400 References: 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: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On 7/4/2015 3:04 AM, Adam Barto=C5=A1 wrote: > This is a minimal example: > > import asyncio > > async def wait(): > await asyncio.sleep(5) > > loop =3D 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=20 immediately on Windows as on Unix. I suggest you post your minimal example there. User interest in an=20 issue being fixed and willingness to test patches can help motivate. Even more minimal: import asyncio loop =3D asyncio.get_event_loop() loop.run_forever also not interruptible, --=20 Terry Jan Reedy