Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'thread': 0.14; 'windows': 0.15; 'abort': 0.16; 'reason).': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'unix,': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; '(for': 0.26; 'header:X -Complaints-To:1': 0.27; 'file': 0.32; 'objects': 0.35; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'easy': 0.60; 'killing': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Sturla Molden Subject: Re: threading Date: Wed, 9 Apr 2014 16:32:53 +0000 (UTC) References: <877g70wg8p.fsf@elektro.pacujo.net> <139834687418749240.077450sturla.molden-gmail.com@news.gmane.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 39-82-11.connect.netcom.no User-Agent: NewsTap/4.0.1 (iPad) X-: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1397061189 news.xs4all.nl 2841 [2001:888:2000:d::a6]:44582 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69965 Sturla Molden wrote: > 3. It is nice to be able to abort a read or write that hangs (for whatever > reason). Killing a thread with pthread_cancel or TerminateThread is not > recommended. While "graceful timeout" is easy to do on Unix, using fcntl.fcntl or signal.alarm, on Windows it requires overlapped I/O. This means the normal Python file objects cannot be used for this purpose on Windows. Sturla