Base::PyGILStateRelease Class Reference

If a thread holds the global interpreter lock (GIL) but runs a long operation in C where it doesn't need to hold the GIL it can release it temporarily. More...

#include <Interpreter.h>

List of all members.

Public Member Functions

 PyGILStateRelease ()
 ~PyGILStateRelease ()

Detailed Description

If a thread holds the global interpreter lock (GIL) but runs a long operation in C where it doesn't need to hold the GIL it can release it temporarily.

Or if the thread has to run code in the main thread where Python code may be executed it must release the GIL to avoid a deadlock. In either case the thread must hold the GIL when instantiating an object of PyGILStateRelease. As PyGILStateLocker it's best to create an instance of PyGILStateRelease on the stack.

Definition at line 113 of file Interpreter.h.


Constructor & Destructor Documentation

Base::PyGILStateRelease::PyGILStateRelease (  )  [inline]

Definition at line 116 of file Interpreter.h.

Base::PyGILStateRelease::~PyGILStateRelease (  )  [inline]

Definition at line 121 of file Interpreter.h.


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

Generated on Wed Nov 23 19:01:47 2011 for FreeCAD by  doxygen 1.6.1