Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "Frank Millman" Newsgroups: comp.lang.python Subject: Re: asyncio - how to stop background task cleanly Date: Sun, 7 Feb 2016 12:20:12 +0200 Lines: 22 Message-ID: References: <87lh6ys052.fsf@elektro.pacujo.net> <87fux5svhk.fsf@elektro.pacujo.net> <8737t5shhp.fsf@elektro.pacujo.net> <87r3gpq7mi.fsf@elektro.pacujo.net> <871t8orhua.fsf@elektro.pacujo.net> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de tXRpJc5NQ5oTaE6KfWC0JQ66qhEiODOKBW1IfFgJ0AvQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'enormous': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'threads,': 0.09; 'thread': 0.10; ':-)': 0.12; 'properly': 0.15; 'begging': 0.16; 'bug,': 0.16; 'ctrl+c': 0.16; 'received:80.91.229.3': 0.16; 'received:io': 0.16; 'received:plane.gmane.org': 0.16; 'received:psf.io': 0.16; 'subject:stop': 0.16; 'windows': 0.20; 'posted': 0.21; 'seems': 0.23; 'wrote': 0.23; "haven't": 0.24; 'header:In-Reply-To:1': 0.24; 'header:X-Complaints-To:1': 0.26; 'linux': 0.26; 'separate': 0.27; 'windows,': 0.29; 'help,': 0.32; 'run': 0.33; 'though.': 0.33; 'running': 0.34; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:org': 0.37; 'to:addr:python.org': 0.40; 'your': 0.60; 'leaving': 0.63; 'box.': 0.66; 'frank': 0.72; 'skip:n 40': 0.72 X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: 197.89.92.138 In-Reply-To: <871t8orhua.fsf@elektro.pacujo.net> X-MSMail-Priority: Normal Importance: Normal X-Newsreader: Microsoft Windows Live Mail 15.4.3502.922 X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3502.922 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102623 "Marko Rauhamaa" wrote in message news:871t8orhua.fsf@elektro.pacujo.net... > "Frank Millman" : > > > I have never been able to get Ctrl+C to work properly on Windows, so I > > use a separate thread that simply waits for Enter. > > Now you are leaving my realm of expertise, as I haven't programmed for > windows since Windows 1.0. Mixing threads, asyncio, input() and Windows > seems like begging for trouble, though. > Well, it is not such a big deal :-) The program I posted works cross-platform, so it will run on your linux box. No matter, you have been an enormous help, and I am very grateful. I found my bug, and my program is now running sweetly. Frank