Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!feeds.news.ox.ac.uk!news.ox.ac.uk!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'cpython': 0.05; 'subject:Python': 0.06; 'exits': 0.09; 'implements': 0.09; '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; 'bytecode': 0.16; 'called.': 0.16; 'concurrency': 0.16; 'concurrency,': 0.16; 'finishes': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'threads.': 0.16; 'underlying': 0.16; 'wrote:': 0.18; 'work,': 0.20; 'print': 0.22; 'header:User-Agent:1': 0.23; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'instruction': 0.29; 'code': 0.31; 'run': 0.32; 'another': 0.32; '(e.g.': 0.33; '(most': 0.33; 'next': 0.36; 'e.g.': 0.38; 'to:addr :python-list': 0.38; 'fact': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'ian': 0.60; 'matter': 0.61; 'from:charset:utf-8': 0.61; 'pick': 0.64; 'lack': 0.78; "'true'": 0.84; 'preventing': 0.84; 'received:hr': 0.84; 'time)': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: =?UTF-8?B?SnVya28gR29zcG9kbmV0acSH?= Subject: Re: Thread._stop() behavior changed in Python 3.4 Date: Mon, 17 Mar 2014 19:51:13 +0100 Organization: PKE sistemi d.o.o. References: <279038900.uDlbjECTej@felix-arch> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: 78-0-199-48.adsl.net.t-com.hr User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1395082292 news.xs4all.nl 2895 [2001:888:2000:d::a6]:35354 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:68452 Hi. On 17.3.2014. 19:03, Ian Kelly wrote: > So yes, despite the lack of true concurrency, a thread can continue to > run after its _stop has been called. Actually 'true' or 'false' concurrency does not matter here. CPython supports multiple threads and implements them using underlying native OS threads. The fact that it has an internal mutex (GIL) preventing it from executing/interpreting Python code at the same time in multiple threads (most of the time) does not come into play.. When one thread exits its GIL protected section (e.g. finishes processing one bytecode instruction and is about to go on to processing the next one), another thread may pick up the GIL and do some of its work, e.g. print out some output. Best regards, Jurko Gospodnetić