global interpreter lock not working as it should

Martin v. Loewis martin at v.loewis.de
Thu Aug 1 08:57:54 CEST 2002


anton wilson <anton.wilson at camotion.com> writes:

> One final clarification on this subject is that with the current
> version of python on my system, the GIL never blocks, and that is
> why I was complaining.  The only reason other threads get scheduled
> is because threads run out of time.

Unfortunately, this does not clarify: If another Python thread gets
activated and performs byte code instructions, that *necessarily*
means that it holds the GIL, and that the first thread now blocks in
the GIL.

So if you see other threads running eventually, it must mean that the
GIL blocks.

Regards,
Martin



More information about the Python-list mailing list