Scaling on multi-processor machine

Dieter Maurer dieter at handshake.de
Sun May 23 15:16:06 EDT 2004


In article <mailman.142.1085154141.6949.python-list at python.org>,
Atul Kshirsagar  <atul.kshirsagar at firstlogic.com> wrote:
>GIL prevents my C++ application embedding and extending python to scale even
>though I spawn multiple C++ threads. I read lot of references on internet
>about using multiple processes rather than threads.

While your C++ threads are not touching Python objects, they
can release the GIL (but must acquire it again before they touch Python
objects, e.g. call into Python).

Thus, you can have your C++ threads work in parallel as long as
they do not touch Python objects.

Dieter



More information about the Python-list mailing list