[C++-sig] Boost.Python and threads

thor.arne.johansen at ibas.no thor.arne.johansen at ibas.no
Tue Sep 19 16:08:29 CEST 2006


What is the status for threads and Boost.Python.

I wish to have multiple (Python) threads.
Each thread owns an instance of a wrapped C++ object doing extensive disk
IO.

Will Boost.Python release the GIL when executing the C++ code?
If I make a C++ wrapper which releases the GIL before executing the code,
will that be safe? (Can I be sure the internals of Boost.Python does not
call into Python Interpreter, without holding the GIL?)

Note I'm extending, and not embedding, so I will only have one Python
interpreter with multiple threads, each running C++ code wrapped with
Boost.Python.

--
Thor Arne Johansen
R&D Director
Ibas AS




More information about the Cplusplus-sig mailing list