![]() |
VISR
0.11.1
Versatile Interactive Scene Renderer
|
#include <gil_ensure_guard.hpp>
Classes | |
class | Impl |
Public Member Functions | |
GilEnsureGuard () | |
~GilEnsureGuard () | |
RAII-style lock guard to ensure that the PyGILState_Ensure() / PyGILState_Realease() pair is executed in the current scope. This implementation differs from pybind11::gil_scoped_acquire in the sense that it can be called in an arbitrary thread (that might not have a an initialized pybind11 local thread state.
visr::pythonsupport::GilEnsureGuard::GilEnsureGuard | ( | ) |
Constructor, ensures that the current thread is initialized to call Python C++ API and locks the Python global interpreter lock (GIL).
|
default |
Destructor, sets the thread state to the state it had before constructor had been called. Also releases the GIL.