TwiceAsNice  2019-02-18
Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Basda::Python::InstanceInterpreter Class Reference


A python interpreter that saves the GIL when constructed and restores it when destructed More...

#include <InstanceInterpreter.h>

Inheritance diagram for Basda::Python::InstanceInterpreter:
Inheritance graph
Collaboration diagram for Basda::Python::InstanceInterpreter:
Collaboration graph

Static Public Member Functions

static void initialize ()
 
static void initialize ()
 

Protected Member Functions

 InstanceInterpreter ()
 
 ~InstanceInterpreter ()
 
 InstanceInterpreter ()
 
 ~InstanceInterpreter ()
 

Protected Attributes

PyThreadState * m_mainThreadState
 The haven where the GIL is stored while python is active. More...
 

Static Protected Attributes

static Nice::Mutex s_mutex
 The guard that is used while initializing any python interpreter. More...
 
static InstanceInterpreterPtr s_instance
 

Detailed Description


A python interpreter that saves the GIL when constructed and restores it when destructed

Constructor & Destructor Documentation

◆ InstanceInterpreter() [1/2]

Basda::Python::InstanceInterpreter::InstanceInterpreter ( )
inlineprotected

◆ ~InstanceInterpreter() [1/2]

Basda::Python::InstanceInterpreter::~InstanceInterpreter ( )
inlineprotected

◆ InstanceInterpreter() [2/2]

Basda::Python::InstanceInterpreter::InstanceInterpreter ( )
inlineprotected

◆ ~InstanceInterpreter() [2/2]

Basda::Python::InstanceInterpreter::~InstanceInterpreter ( )
inlineprotected

Member Function Documentation

◆ initialize() [1/2]

static void Basda::Python::InstanceInterpreter::initialize ( )
inlinestatic

◆ initialize() [2/2]

static void Basda::Python::InstanceInterpreter::initialize ( )
inlinestatic

Member Data Documentation

◆ m_mainThreadState

PyThreadState * Basda::Python::InstanceInterpreter::m_mainThreadState
protected

The haven where the GIL is stored while python is active.

◆ s_instance

static InstanceInterpreterPtr Basda::Python::InstanceInterpreter::s_instance
staticprotected

◆ s_mutex

static Nice::Mutex Basda::Python::InstanceInterpreter::s_mutex
staticprotected

The guard that is used while initializing any python interpreter.


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