30 #ifndef _MIRA_TOOLBOXES_PYTHON_SCOPEDGIL_H_ 31 #define _MIRA_TOOLBOXES_PYTHON_SCOPEDGIL_H_ 35 namespace mira {
namespace python {
60 mState = PyGILState_Ensure();
73 PyGILState_Release(mState);
79 PyGILState_STATE mState;
104 mState = PyEval_SaveThread();
116 PyEval_RestoreThread(mState);
122 PyThreadState* mState;
~ScopedGILLock()
Definition: ScopedGIL.h:64
ScopedGILThreadLock()
Definition: ScopedGIL.h:102
void unlock()
Definition: ScopedGIL.h:112
~ScopedGILThreadLock()
Definition: ScopedGIL.h:107
void unlock()
Definition: ScopedGIL.h:69
A scoped global interpreter (GIL) lock.
Definition: ScopedGIL.h:54
ScopedGILLock()
Definition: ScopedGIL.h:58
A scoped global interpreter (GIL) lock.
Definition: ScopedGIL.h:99