OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
Slic3r::PythonGILState Class Reference

#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/plugin/PythonInterpreter.hpp>

Collaboration diagram for Slic3r::PythonGILState:

Public Member Functions

 PythonGILState ()
 ~PythonGILState ()
 operator bool () const

Private Attributes

PythonRuntimeLease m_runtime_lease
PyGILState_STATE m_state {}
bool m_acquired = false

Detailed Description

Constructor & Destructor Documentation

◆ PythonGILState()

Slic3r::PythonGILState::PythonGILState ( )
inline
171 {
173 if (m_runtime_lease) {
174 m_state = PyGILState_Ensure();
175 m_acquired = true;
176 }
177 }
PythonRuntimeLease m_runtime_lease
Definition PythonInterpreter.hpp:187
bool m_acquired
Definition PythonInterpreter.hpp:189
PyGILState_STATE m_state
Definition PythonInterpreter.hpp:188
PythonRuntimeLease acquire_runtime_lease()
Definition PythonInterpreter.hpp:162
static PythonInterpreter & instance()
Definition PythonInterpreter.cpp:434

References Slic3r::PythonInterpreter::acquire_runtime_lease(), Slic3r::PythonInterpreter::instance(), m_acquired, m_runtime_lease, and m_state.

Here is the call graph for this function:

◆ ~PythonGILState()

Slic3r::PythonGILState::~PythonGILState ( )
inline
179 {
180 if (m_acquired)
181 PyGILState_Release(m_state);
182 }

References m_acquired, and m_state.

Member Function Documentation

◆ operator bool()

Slic3r::PythonGILState::operator bool ( ) const
inlineexplicit
184{ return m_acquired; }

References m_acquired.

Member Data Documentation

◆ m_acquired

bool Slic3r::PythonGILState::m_acquired = false
private

◆ m_runtime_lease

PythonRuntimeLease Slic3r::PythonGILState::m_runtime_lease
private

Referenced by PythonGILState().

◆ m_state

PyGILState_STATE Slic3r::PythonGILState::m_state {}
private
188{};

Referenced by PythonGILState(), and ~PythonGILState().


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