[PyKDE] PyThreadState_Get, PyEval_*Thread, NULL tstate.
phil at riverbankcomputing.co.uk
Fri Feb 13 20:57:01 GMT 2004
On Thursday 12 February 2004 20:48, Patrick Stinson wrote:
> I posted a while ago about the 'PyEval_RestoreThread: NULL tstate:' error,
> and now I'm getting the same problem with PyThreadState_Get (if I remember
> correctly, its the call that happens before PyEval_RestoreThread).
> and even earlier:
> As Before, I'm writing an audio application that uses background threads
> for buffering and audio streaming. The threads are entirely contained in my
> c++ (sipped) lib and execution never enters python code. What could cause a
> NULL thread state in the interpreter? This occurs at different times, and
> with what seem slike varying levels of complexity in pyqt Gui code. Does
> anyone know how I should be interpreting this? What does this generally
I can't remember which version of SIP you are using.
If you are using SIP v3 then you have to be *extremely* careful about managing
the thread state. Are you sure that "execution never enters python code"?
Things are much easier with SIP v4 because it uses the new thread API in
More information about the PyQt