|
Mantid
|
Defines a structure for releasing the Python GIL using the RAII pattern. More...
#include <ReleaseGlobalInterpreterLock.h>
Public Member Functions | |
| ReleaseGlobalInterpreterLock () | |
| Default constructor. More... | |
| ~ReleaseGlobalInterpreterLock () | |
| Destructor. More... | |
Private Attributes | |
| PyThreadState * | m_saved |
| PyObject * | m_tracearg |
| Py_tracefunc | m_tracefunc |
Defines a structure for releasing the Python GIL using the RAII pattern.
This releases the Python GIL for the duration of the current scope.
Definition at line 20 of file ReleaseGlobalInterpreterLock.h.
| Mantid::PythonInterface::ReleaseGlobalInterpreterLock::ReleaseGlobalInterpreterLock | ( | ) |
Default constructor.
Ensures this thread releases the Python GIL also save trace information to be restored upon destruction.
Definition at line 15 of file ReleaseGlobalInterpreterLock.cpp.
References m_saved, m_tracearg, and m_tracefunc.
| Mantid::PythonInterface::ReleaseGlobalInterpreterLock::~ReleaseGlobalInterpreterLock | ( | ) |
Destructor.
Restores the Python GIL to the thread when the object falls out of scope.
Definition at line 28 of file ReleaseGlobalInterpreterLock.cpp.
References m_saved, m_tracearg, and m_tracefunc.
|
private |
Definition at line 30 of file ReleaseGlobalInterpreterLock.h.
Referenced by ReleaseGlobalInterpreterLock(), and ~ReleaseGlobalInterpreterLock().
|
private |
Definition at line 29 of file ReleaseGlobalInterpreterLock.h.
Referenced by ReleaseGlobalInterpreterLock(), and ~ReleaseGlobalInterpreterLock().
|
private |
Definition at line 28 of file ReleaseGlobalInterpreterLock.h.
Referenced by ReleaseGlobalInterpreterLock(), and ~ReleaseGlobalInterpreterLock().