[C++-sig] Threading support ?
daveh at cadlink.com
Mon Jun 17 05:09:02 CEST 2002
A useful facility in boost would be the ability for the user to 'plug-in'
code to support the Python GIL. Using the call policies precall/postcall
facilty would possibly be one way that this could be achieved when calling
c++ code from Python, though this is not ideal as it would be difficult to
make it exception proof. Also there is not similar support when calling from
c++ to python.
What I think is needed is a way of specifying a user defined class to be
defined inline with the call, much as the converter is in the code snippet
from boost below:
In fact, by providing a specialised converter its constructor/destructor
could manage the GIL, but this is not really very practical.
Any ideas for supporting the GIL within boost, without adding overhead where
it's not needed?
More information about the Cplusplus-sig