Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Releasing the GIL when calling a template function #242

Open
marktsuchida opened this issue May 31, 2024 · 0 comments
Open

Releasing the GIL when calling a template function #242

marktsuchida opened this issue May 31, 2024 · 0 comments

Comments

@marktsuchida
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant