mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Hmmm something is wrong here with the Python interpreter
Former-commit-id: bfa87ac83ae1518348e5fe1ed77f20475134e1b0
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
#include <effectengine/EffectEngine.h>
|
||||
#include "Effect.h"
|
||||
|
||||
//static PyThreadState *_mainThreadState = 0;
|
||||
|
||||
EffectEngine::EffectEngine(Hyperion * hyperion) :
|
||||
_hyperion(hyperion),
|
||||
_availableEffects(),
|
||||
@@ -21,6 +23,7 @@ EffectEngine::EffectEngine(Hyperion * hyperion) :
|
||||
std::cout << "Initializing Python interpreter" << std::endl;
|
||||
Py_InitializeEx(0);
|
||||
PyEval_InitThreads(); // Create the GIL
|
||||
//_mainThreadState = PyEval_SaveThread();
|
||||
PyEval_ReleaseLock(); // Release the GIL
|
||||
}
|
||||
|
||||
@@ -29,7 +32,8 @@ EffectEngine::~EffectEngine()
|
||||
// clean up the Python interpreter
|
||||
std::cout << "Cleaning up Python interpreter" << std::endl;
|
||||
PyEval_AcquireLock(); // Get the Gil
|
||||
Py_Finalize();
|
||||
//PyEval_RestoreThread(_mainThreadState);
|
||||
//Py_Finalize();
|
||||
}
|
||||
|
||||
std::list<std::string> EffectEngine::getEffects() const
|
||||
|
Reference in New Issue
Block a user