global interpreter lock not working as it should

Paul Rubin phr-n2002b at NOSPAMnightsong.com
Tue Jul 30 17:50:47 EDT 2002


brueckd at tbye.com writes:
> When you get right down to it, there's really *little* difference between 
> Python threads and C threads, so the above statement doesn't make too much 
> sense to me. Sure the GIL makes sure that Python object internals are 
> fiddled with one thread at a time, but if you have only 1 CPU, there's 
> only one thread running at a time anyway, regardless of whether your 
> program is in C or Python. IOW, the GIL has no real effect on the 
> applicability or usefulness of threads (assuming a single CPU).

But that is precisely the gripe about the GIL.  If you have multiple
CPU's, you can use them with C threads but not with Python threads.



More information about the Python-list mailing list