If the application starts we release immediately the global interpreter lock (GIL) once the Python interpreter is initialized, i.e. More...
#include <Interpreter.h>
Public Member Functions | |
PyGILStateLocker () | |
~PyGILStateLocker () | |
If the application starts we release immediately the global interpreter lock (GIL) once the Python interpreter is initialized, i.e.
no thread – including the main thread doesn't hold the GIL. Thus, every thread must instantiate an object of PyGILStateLocker if it needs to access protected areas in Python or areas where the lock is needed. It's best to create the instance on the stack, not on the heap.
Base::PyGILStateLocker::PyGILStateLocker | ( | ) |
Base::PyGILStateLocker::~PyGILStateLocker | ( | ) |