Files
vrpmdv-rtservice/include/GILLock.h
2024-04-17 09:34:52 +02:00

22 lines
340 B
C++

#include <boost/python.hpp>
#include <boost/thread.hpp>
//Use this class in a c++ funktion that called into python : c++ => python
class PyLockGIL
{
public:
PyLockGIL();
~PyLockGIL();
PyLockGIL(const PyLockGIL&) = delete;
PyLockGIL& operator=(const PyLockGIL&) = delete;
private:
PyGILState_STATE m_gstate;
};