global interpreter lock not working as it should
brueckd at tbye.com
brueckd at tbye.com
Tue Jul 30 19:20:00 EDT 2002
On 30 Jul 2002, Paul Rubin wrote:
> 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.
Oh, I don't disagree with you one bit, Paul. I _am_ disagreeing with the
notion that on the OP's single CPU system the GIL is causing him problems.
-Dave
More information about the Python-list
mailing list