re-entrant call to PyEval_RestoreThread(context) hangs

Paul pcaffrey at iel.ie
Thu Feb 26 06:54:42 EST 2004


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?



More information about the Python-list mailing list