On Mar 5, 2010, at 13:48, Bill Janssen <jans...@parc.com> wrote:

The problem Python has with multiple cores and multi-threading, pointed
out by Dave Beazley last year (http://www.dabeaz.com/python/GIL.pdf),
looks like it will still persist for the next three or four years, at
least, on OS X. Incredible but true. I'm presuming that PyLucene also
suffers from it, though the interaction with Java threads makes me
wonder a bit.

Anyone know whether this is so?

Any thread that enters java releases the GIL. When the execution returns (or enters) python again, the GIL is reacquired.

In other words, the answer to your question depends on how much time your threads are spending in the JVM.

And, a follow-up question: if one were to build a version of Python 2.6
with the "newgil" patch in http://bugs.python.org/issue7753 applied,
would it break jcc?

If the GIL and threading APIs didn't change I wouldn't expect any issues.

Andi..


Bill

Reply via email to