P
Paul
following hangs when re-entered
run()
{
PyEval_RestoreThread(context);
pName = PyString_FromString(script);
Py_DECREF(pName);
context = PyEval_SaveThread();
}
This invokes a python script (using context[0])
The python script uses "swig" to call back into the run() method
The run() method now calls PyEval_RestoreThread(context[1])
but this hangs
ie to summarise
C++ run() context0
-> .py
-> C++ run() context1 HANGS!
Can anyone suggest a solution for this?
run()
{
PyEval_RestoreThread(context);
pName = PyString_FromString(script);
Py_DECREF(pName);
context = PyEval_SaveThread();
}
This invokes a python script (using context[0])
The python script uses "swig" to call back into the run() method
The run() method now calls PyEval_RestoreThread(context[1])
but this hangs
ie to summarise
C++ run() context0
-> .py
-> C++ run() context1 HANGS!
Can anyone suggest a solution for this?