[C++-sig] RAII for the GIL in Boost.Python?

Niall Douglas s_sourceforge at nedprod.com
Thu Dec 27 22:20:53 CET 2012


On 26 Dec 2012 at 11:49, Adam Preble wrote:

> Also if you're curious, I tried that above experiment with .NET code using
> IronPython and Python.NET.  IronPython took it in stride, and Python.NET
> died at #3; it couldn't create a Python implementation of a .NET interface
> because it would choke somewhere in the module the moment I'd finish
> defining the Python implementation.  I think it was while filling in the
> __new__ operator for the just-defined object.
> 
> So my own problems have been somewhat different--I haven't even been
> thinking about releasing the lock on longer operations.  However, having
> some smarts around the GIL would be nice.  In my own head I thought of it
> like the interpreter state having a special mutex, from which one could use
> all the Boost locks as if it were any other mutex.  I never thought about
> what that would be like to implement.

Thing is, .NET has a full IDL interop with COM shim and a well 
specified threading model. In other words, it provides lots of 
support for mixing up lots of different languages, so getting 
multiple language interop working on .NET (or even COM) is vastly 
easier than anywhere else.

Niall

-- 
Any opinions or advice expressed here do NOT reflect those
of my employer Research In Motion Inc.
Work Portfolio: http://careers.stackoverflow.com/nialldouglas/



-------------- next part --------------
A non-text attachment was scrubbed...
Name: SMime.p7s
Type: application/x-pkcs7-signature
Size: 6061 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20121227/530342b2/attachment.bin>


More information about the Cplusplus-sig mailing list