Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #68452

Re: Thread._stop() behavior changed in Python 3.4

From Jurko Gospodnetić <jurko.gospodnetic@pke.hr>
Subject Re: Thread._stop() behavior changed in Python 3.4
Date 2014-03-17 19:51 +0100
Organization PKE sistemi d.o.o.
References <279038900.uDlbjECTej@felix-arch> <CAPTjJmrNizyUvY=XC+FwKcTv+TDMKQv9YL6dyc3WjiGDtB+6iw@mail.gmail.com> <CALwzidkdqEGebjtnAsxGzC0Y1z+k_WZxfSHkBbS9sD6RZy10uQ@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.8217.1395082291.18130.python-list@python.org> (permalink)

Show all headers | View raw


   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ć

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Thread._stop() behavior changed in Python 3.4 Jurko Gospodnetić <jurko.gospodnetic@pke.hr> - 2014-03-17 19:51 +0100

csiph-web