On 8/09/2009 9:16 AM, Grant Edwards wrote:
On 2009-09-07, Mark Hammond<skippy.hamm...@gmail.com> wrote:
CPython's GIL means that multithreading on multiple
processors/cores has limitations. Each interpreter has its own
GIL, so processor-intensive applications work better using the
multiprocessing module than with the threading module.
I believe you will find the above is incorrect - even with
multiple interpreter states you still have a single GIL.
Please explain how multiple processes, each with a separate
Python interpreter, share a single GIL.
Sorry, my mistake, I misread the original - using multiple Python
processes does indeed have a GIL per process. I was referring to the
'multiple interpreters in one process' feature of Python which is
largely deprecated, but if used, all 'interpreters' share the same GIL.
To clarify: in a single process there will only ever be one GIL, but in
multiple processes there most certainly will be multiple GILs.
Apologies for the confusion...
Cheers,
Mark
--
http://mail.python.org/mailman/listinfo/python-list