[C++-sig] Managing the GIL across competing threads

Stefan Seefeld stefan at seefeld.name
Sun Mar 18 17:05:38 CET 2012

On 2012-03-18 11:54, Jim Bosch wrote:
> On 03/17/2012 11:20 PM, Adam Preble wrote:
>> On Sat, Mar 17, 2012 at 1:44 PM, Niall Douglas
>> <s_sourceforge at nedprod.com <mailto:s_sourceforge at nedprod.com>> wrote:
>>     If by "Python side" you mean Boost.Python, then I agree: BPL has no
>>     support for GIL management at all, and it really ought to. This was
>>     one of the things that was discussed in the BPL v3 discussions on
>>     this list a few months ago.
>> Hey do you know any terms or thread names where I could go digging
>> through some of those discussions?
> Look for "[Boost.Python v3]" and "New Major-Release Boost.Python
> Development" in the subject line.
> We didn't go into a lot of depth on the threading, I'm afraid, as one
> of the problems is that the guy starting the effort - me - doesn't
> actually know much about threaded programming.  But I am hoping that I
> can design things in such a way that someone like Niall could easily
> take it from there.

I recall seeing a discussion of locking policy being attached to
individual functions by means of the return-value and argument-passing
policy traits; in other words, something that's associated with
from-python and to-python conversion. I found that rather elegant. I'm
not sure whether anyone has any practical experience with that
technique, or whether it was just an idea worth exploring.



      ...ich hab' noch einen Koffer in Berlin...

More information about the Cplusplus-sig mailing list