Initializes the python interpreter as well as python threading.
More...
#include <python_interpreter_state.h>
|
| PythonInterpreterState (int argc, const char *const *argv, bool allowThreads=false) |
| Constructor. Initializes Python with the given start parameters, enables threading, and releases GIL. More...
|
|
| PythonInterpreterState (int argc, const std::vector< const char * > &argv, bool allowThreads=false) |
| Constructor. Initializes Python with the given start parameters, enables threading, and releases GIL. More...
|
|
| PythonInterpreterState (bool allowThreads=false) |
| Constructor. Initializes Python with the no start parameters, enables threading, and releases GIL. More...
|
|
void | allowThreads () |
| Allow execution of other threads. If this is set, main thread may not execute python code. More...
|
|
bool | threadsAllowed () const |
| Are threads currently allowed? More...
|
|
void | endAllowThreads () |
| Halt other threads from executin. This is required if python code should be executed in the main thread. More...
|
|
| ~PythonInterpreterState () |
| Destructor. Reestablishes thread state. More...
|
|
Initializes the python interpreter as well as python threading.
◆ PythonInterpreterState() [1/3]
PythonInterpreterState::PythonInterpreterState |
( |
int |
argc, |
|
|
const char *const * |
argv, |
|
|
bool |
allowThreads = false |
|
) |
| |
Constructor. Initializes Python with the given start parameters, enables threading, and releases GIL.
- Parameters
-
◆ PythonInterpreterState() [2/3]
PythonInterpreterState::PythonInterpreterState |
( |
int |
argc, |
|
|
const std::vector< const char * > & |
argv, |
|
|
bool |
allowThreads = false |
|
) |
| |
Constructor. Initializes Python with the given start parameters, enables threading, and releases GIL.
- Parameters
-
◆ PythonInterpreterState() [3/3]
PythonInterpreterState::PythonInterpreterState |
( |
bool |
allowThreads = false | ) |
|
|
explicit |
Constructor. Initializes Python with the no start parameters, enables threading, and releases GIL.
- Parameters
-
◆ ~PythonInterpreterState()
PythonInterpreterState::~PythonInterpreterState |
( |
| ) |
|
Destructor. Reestablishes thread state.
◆ allowThreads()
void PythonInterpreterState::allowThreads |
( |
| ) |
|
Allow execution of other threads. If this is set, main thread may not execute python code.
◆ endAllowThreads()
void PythonInterpreterState::endAllowThreads |
( |
| ) |
|
Halt other threads from executin. This is required if python code should be executed in the main thread.
◆ threadsAllowed()
bool PythonInterpreterState::threadsAllowed |
( |
| ) |
const |
Are threads currently allowed?
- Returns
- Returns true if allowed, false otherwise
The documentation for this class was generated from the following files: