[C++-sig] [patch] Make boost python accessible by multiple threads

Charles Solar charlessolar at gmail.com
Fri Jul 16 20:38:48 CEST 2010

I mentioned it before but I have this patch for boost python that adds
code to lock and unlock the gil at all the boundaries I have found
between python and boost python.  This makes it so multiple threads
can call into python without the user having to lock and unlock the
gil themselves.  I am pretty sure this is a very much desired feature
but I guess the developers are waiting for a head start, so here is
the patch file that can be applied to the boost trunk or any of the
1.4x versions of boost python.  I would very much like to see the
patch correctly worked into boost python so I no longer have to
maintain it myself.
I have been using this in my application for a few months now and I am
fairly confident in its completeness when NOT embedding python
interpreters.  There may be more entry points I have missed because I
do not embed python in my app, therefore I would say this patch is
only non-embedded systems.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: boost_python.patch
Type: application/octet-stream
Size: 10015 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20100716/0701705d/attachment.obj>

More information about the Cplusplus-sig mailing list