By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,345 Members | 1,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,345 IT Pros & Developers. It's quick & easy.

C API: NULL tstate

P: n/a
I am using sip to generate python bindings for my c++ library. sip is also
used to generate python bindings for the Qt Gui toolkit. The PyEval_*Thread
and PyThreadState_* seem to end up with a NULL tstate parameter at different
points of execution when I start instantiating more complicated sip-wrapped
widget classes along with my own multi-threaded library. At one point, I
moved the thread creation code into python (by causing it to simply call a
method in my library to execute the thread), and it helped a bit.

I'm obviously not looking for help with sip, but it would be nice to get a
general overview of what conditions cause a NULL tstate to be passed to
these
functions. I've posted a few messages on the sip mailing list about this,
but
the problem seems a little too biased toward the scope of this list for any
of them to answer.

Cheers!
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

Did you call PyEval_InitThreads()? If you don't, the thread stuff
is a mostly a NOP.

Cheers,
Rich

In article <10*************@corp.supernews.com>, aj*****@gci.net says...
I am using sip to generate python bindings for my c++ library. sip is also
used to generate python bindings for the Qt Gui toolkit. The PyEval_*Thread
and PyThreadState_* seem to end up with a NULL tstate parameter at different
points of execution when I start instantiating more complicated sip-wrapped
widget classes along with my own multi-threaded library. At one point, I
moved the thread creation code into python (by causing it to simply call a
method in my library to execute the thread), and it helped a bit.

I'm obviously not looking for help with sip, but it would be nice to get a
general overview of what conditions cause a NULL tstate to be passed to
these
functions. I've posted a few messages on the sip mailing list about this,
but
the problem seems a little too biased toward the scope of this list for any
of them to answer.

Cheers!

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.