At 10:07 AM 9/13/2006 -0700, Andi Vajda wrote:
If PyLucene never released the GIL then the system would appear to hang
temporarily when, for example, optimizing indexes which can take several
seconds (or more).
Also, since one can write python extensions to PyLucene, it can call back
into python. Because of this and because acquiring the GIL is not
re-entrant - Phillip, correct me if I'm wrong - the GIL has to be acquired
or released anytime the Python / C++ boundary is crossed.
Not really. You *can* release the GIL in order to allow Python code to run
alongside you, but there is no requirement that you do so. Normally,
releasing the GIL is something that happens only when waiting for I/O or
doing calculations that may run for an extended period. So, it certainly
makes sense to release it in the PyLucene case, but it's not a requirement
that all C or C++ code must follow.
But regarding the locale issue, the hard part is that the problem doesn't
appear to be reproducible in a reliable way, so confirming *anything* about
the problem is virtually impossible.
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
Open Source Applications Foundation "chandler-dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/chandler-dev