Commit e5aa235c authored by Berk Geveci's avatar Berk Geveci
Browse files

BUG: Bug was introduced following fix for 4823. When the python programmable...

BUG: Bug was introduced following fix for 4823. When the python programmable filter was used through the GUI, it would hang on windows. The reason being that the interpretor used by the filter did not use locking (locking was used by the interpretor in the python shell and the testing thread). However, we still don't want the filter interpretor to use the lock if it is executed through a python shell as the python shell would already have acquired the lock. This fixes the issue by making the interpretor used by the filter use locking when a lock is not already held by another instance of vtkPVPythonInterpretor. As a consequence, however, vtkPVPythonInterpretor cannot be used in different threads.
parent 04dbcb3b
......@@ -424,9 +424,12 @@ pqPythonEventSource::pqPythonEventSource(QObject* p)
#ifdef SIGINT
signal(SIGINT, SIG_DFL);
#endif
PyEval_InitThreads();
PyEval_ReleaseLock();
}
PyEval_InitThreads();
PyEval_AcquireLock();
// add QtTesting to python's inittab, so it is
// available to all interpreters
PyImport_AppendInittab(const_cast<char*>("QtTesting"), initQtTesting);
......
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