Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'interfaces': 0.04; 'handler': 0.05; 'preferably': 0.05; 'imho.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'responsive': 0.09; 'gui': 0.12; 'thread': 0.14; 'multimedia.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'spawn': 0.16; 'do,': 0.16; 'wrote:': 0.18; 'things.': 0.19; 'programming': 0.22; 'creating': 0.23; 'header:User-Agent:1': 0.23; 'certainly': 0.24; 'sort': 0.25; 'header:X-Complaints-To:1': 0.27; 'chris': 0.29; 'absolute': 0.30; 'running': 0.33; 'operating': 0.37; 'handle': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'even': 0.60; 'event.': 0.60; 'new': 0.61; 'simply': 0.61; 'guarantee': 0.63; 'maximum': 0.63; 'great': 0.65; 'heavy': 0.81; 'grew': 0.84; 'pervasive': 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 19:20:22 +0000 (UTC) References: <87k3ayl893.fsf@elektro.pacujo.net> 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: 17 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1397071239 news.xs4all.nl 2882 [2001:888:2000:d::a6]:57076 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69973 Chris Angelico wrote: > People with a fear of threaded programming almost certainly never grew > up on OS/2. :) I learned about GUI programming thus: Write your > synchronous message handler to guarantee that it will return in an > absolute maximum of 0.1s, preferably a lot less. If you have any sort > of heavy processing to do, spin off a thread. It was simply the normal > way to do things. That is still the best way to do it, IMHO. As I recall, on BeOS the operating system would even spawn a new thread to handle each GUI event. Pervasive multithreading is great for creating responsive user interfaces and running multimedia. Sturla