[pylucene-dev] simple threading segfault demo
Andi Vajda
vajda at osafoundation.org
Tue Mar 20 09:09:53 PST 2007
On Tue, 20 Mar 2007, Ofer Nave wrote:
> What if I had subclassed the Query or Similarity class? Wouldn't the Java
> searcher constantly be calling back into my Python code while executing the
> query, thereby dramatically reducing the portion of time that is fully
> concurrent?
Indeed, anytime you cross from Python -> C++/Java the GIL is released.
And anytime you cross back C++/Java -> Python because the call returns or
calls back into Python, the GIL is reacquired.
Andi..
More information about the pylucene-dev
mailing list