Base::PyGILStateLocker Class Reference

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PyGILStateLocker()

Base::PyGILStateLocker::PyGILStateLocker ( )

◆ ~PyGILStateLocker()

Base::PyGILStateLocker::~PyGILStateLocker ( )

The documentation for this class was generated from the following file: