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.
Definition at line 88 of file Interpreter.h.
Base::PyGILStateLocker::PyGILStateLocker | ( | ) | [inline] |
Definition at line 91 of file Interpreter.h.
Base::PyGILStateLocker::~PyGILStateLocker | ( | ) | [inline] |
Definition at line 95 of file Interpreter.h.