With a non-template function overload set f(), I can set cppyy.gbl.f.__release_gil__ = True.
With a function template g<T>(), both cppyy.gbl.g and cppyy.gbl.g["int"] are of type cppyy.TemplateProxy, which does not have any of the special variables such as __release_gil__.
Is there a way to release the GIL when calling g?
(It would be super-nice if I could do cppyy.gbl.g.__release_gil__ = True and have it apply to all specializations of g.)
My last resort will be to cppdef a non-template wrapper around g, but I was wondering if there is (or could be) any simpler way.
With a non-template function overload set
f()
, I can setcppyy.gbl.f.__release_gil__ = True
.With a function template
g<T>()
, bothcppyy.gbl.g
andcppyy.gbl.g["int"]
are of typecppyy.TemplateProxy
, which does not have any of the special variables such as__release_gil__
.Is there a way to release the GIL when calling
g
?(It would be super-nice if I could do
cppyy.gbl.g.__release_gil__ = True
and have it apply to all specializations ofg
.)My last resort will be to
cppdef
a non-template wrapper aroundg
, but I was wondering if there is (or could be) any simpler way.