Version: 8.3.0
YACS::ENGINE::InterpreterSaveThread Class Reference

#include <PythonPorts.hxx>

Collaboration diagram for YACS::ENGINE::InterpreterSaveThread:

Public Member Functions

 InterpreterSaveThread ()
 
 ~InterpreterSaveThread ()
 
void lock ()
 
void unlock ()
 

Private Attributes

PyThreadState * tstate_
 

Detailed Description

Definition at line 46 of file PythonPorts.hxx.

Constructor & Destructor Documentation

YACS::ENGINE::InterpreterSaveThread::InterpreterSaveThread ( )
inline

Definition at line 48 of file PythonPorts.hxx.

References tstate_.

48  {
49  tstate_ = PyEval_SaveThread();
50  }
YACS::ENGINE::InterpreterSaveThread::~InterpreterSaveThread ( )
inline

Definition at line 51 of file PythonPorts.hxx.

References tstate_.

51  {
52  PyEval_RestoreThread(tstate_);
53  }

Member Function Documentation

void YACS::ENGINE::InterpreterSaveThread::lock ( )
inline

Definition at line 54 of file PythonPorts.hxx.

References tstate_.

54  {
55  PyEval_RestoreThread(tstate_);
56  }
void YACS::ENGINE::InterpreterSaveThread::unlock ( )
inline

Definition at line 57 of file PythonPorts.hxx.

References tstate_.

57  {
58  tstate_ = PyEval_SaveThread();
59  }

Member Data Documentation

PyThreadState* YACS::ENGINE::InterpreterSaveThread::tstate_
private

Definition at line 61 of file PythonPorts.hxx.

Referenced by InterpreterSaveThread(), lock(), unlock(), and ~InterpreterSaveThread().


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