[C++-sig] boost::python threading problem

Tim Blechmann tim at klingt.org
Wed May 2 15:41:07 CEST 2007


hi all,

trying to hunt a deadlock, i've figured out, that during the execution
of wrapped c++ functions, python global interpreter lock is not
released.
in my specific case it lead to this behaviour:
thread A (python) calls a wrapped c++ function, that locks mutex M
thread B (c++) locks mutex M before calling a python function.

from my understanding, this shouldn't be a problem, if the gil would be
released for the time of the c++ function call... while this can be done
from within the wrapped c++ function (via Py_BEGIN_ALLOW_THREADS and
Py_END_ALLOW_THREADS), i would be in favor of a solution, where i
wouldn't have to change the c++ code ...

is this a known issue? are there any plans to change this behavior?

thanks, tim

--
tim at klingt.org    ICQ: 96771783
http://tim.klingt.org

There's no such entity as "most people". These are generalities. All
generalities are meaningless. You've got to pin it down to a specific
person doing a specific thing at a specific time and space.
  William S. Burroughs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070502/596b3bd9/attachment.pgp>


More information about the Cplusplus-sig mailing list