alanmk at hotmail.com
Mon Sep 5 13:01:39 CEST 2005
>> One Python process will only saturate one CPU (at a time) because
>> of the GIL (global interpreter lock).
> I'm hoping python won't always be like this.
> However its crystal clear now the future is SMP.
> So, I believe Python has got to address the GIL, and soon.
I note that PyPy currently also has a GIL, although it should hopefully
go away in the future.
Armin and Richard started to change genc so that it can handle the
new external objects that Armin had to introduce to implement
threading in PyPy. For now we have a simple GIL but it is not
really deeply implanted in the interpreter so we should be able to
change that later. After two days of hacking the were finished.
Despite that it is still not possible to translate PyPy with
threading because we are missing dictionaries with int keys on the
The more I read about such global interpreter locks, the more I think
that the difficulty in getting rid of them lies in implementing portable
and reliable garbage collection.
Read this thread to see what Matz has to say about threading in Ruby.
One of these years I'm going to have to set aside a month or two to go
through and understand the cpython interpreter code, so that I have a
first-hand understanding of the issues.
email alan: http://xhaus.com/contact/alan
More information about the Python-list