[C++-sig] Re: Boost.Python and threads
dave at boost-consulting.com
Sat Oct 4 00:28:19 CEST 2003
Pierre Barbier de Reuille <pierre.barbier at cirad.fr> writes:
> I've followed the thread about boost.python multithreading between
> Lijun Qin and David Abrahams and I wondered where was the
> implementation of this ? If there is no implementation, what is the
> best way to safely unblock the python threads ? Or at least where
> can I find information about this ?
Sorry it took so long to reply Pierre; I was really hoping someone
else (like Lijun) would answer.
Anyway, I don't have an implementation of multithreading support, at
least not yet.
THe best way to safely unblock threads that I know of is to write a
thin wrapper around your function which uses Py_BEGIN_ALLOW_THREADS
and Py_END_ALLOW_THREADS around a call to the real function.
More information about the Cplusplus-sig