Commit cf42ad5e authored by Mathieu Westphal's avatar Mathieu Westphal
Browse files

Correcting NO_PYTHON_THREAD in PYTHON_FULL_THREADSAFE

PyEval_InitThread / PyEval_SaveThread should be available only with full threadsafe
parent 7c8572e0
......@@ -145,14 +145,14 @@ bool vtkPythonInterpreter::Initialize(int initsigs /*=0*/)
{
vtkPythonInterpreter::InitializedOnce = true;
#ifndef VTK_NO_PYTHON_THREADS
#ifdef VTK_PYTHON_FULL_THREADSAFE
int threadInit = PyEval_ThreadsInitialized();
PyEval_InitThreads(); // safe to call this multiple time
if(!threadInit)
{
PyEval_SaveThread(); // release GIL
}
#endif
#endif
// HACK: Calling PyRun_SimpleString for the first time for some reason results in
// a "\n" message being generated which is causing the error dialog to
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment