You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add release_gil_before_calling_cpp_dtor annotation for class_ (#5522)
* Backport of google/pybind11clif#30088 (main PR) and google/pybind11clif#30092 (minor fixes).
Note for completeness:
These are identical to the current versions on the pybind11clif main branch (@ commit 4841661df5daf26ecdedaace54e64d0782e63f64):
* test_class_release_gil_before_calling_cpp_dtor.cpp
* test_class_release_gil_before_calling_cpp_dtor.py
* Fix potential data race in test_class_release_gil_before_calling_cpp_dtor.cpp
The original intent was to let the singleton leak, but making that tread-safe is slightly more involved than this solution. It's totally fine in this case if the RegistryType destructor runs on process teardown.
See also: #5522 (comment)
---------
Co-authored-by: Ralf W. Grosse-Kunstleve <[email protected]>
0 commit comments