Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.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.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; 'scalability': 0.09; 'thread': 0.14; 'abort': 0.16; 'reason).': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'threads,': 0.16; 'threads.': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'header:User-Agent:1': 0.23; 'stick': 0.24; 'earlier': 0.24; 'handling': 0.26; '(for': 0.26; 'header:X-Complaints-To:1': 0.27; 'linux': 0.33; 'there': 0.35; 'ram': 0.36; 'whatever': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'to:addr:python.org': 0.39; 'enough': 0.39; 'system.': 0.39; 'received:org': 0.40; 'read': 0.60; 'benefit': 0.68; '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 15:29:26 +0000 (UTC) References: <877g70wg8p.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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1397057389 news.xs4all.nl 2978 [2001:888:2000:d::a6]:40814 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69959 "Frank Millman" wrote: > If I have understood correctly, then is there any benefit at all in my going > async? I might as well just stick with threads for the request handling as > well as the database handling. 1. There is a scalability issue with threads, particularly if you don't have enough RAM or use a 32 bit system. 2. Earlier Linux kernels did not perform well if they had to schedule 10,000 threads. 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. Sturla