Thread._stop() behavior changed in Python 3.4
jurko.gospodnetic at pke.hr
Mon Mar 17 19:51:13 CET 2014
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.
More information about the Python-list