Understanding PyEval_InitThreads

Donn Cave donn at drizzle.com
Wed Nov 20 23:03:09 EST 2002


Quoth hansgeunsmeyer at earthlink.net (hg):
...
| As far as I understand it, it doesn't really matter _what_ the thread
| state is that you swap into the current state before you do the
| callback, as long as it is _some_ valid thread state (not NULL). So,
| before you do the callback, at any moment when you're in the main
| Python thread, you could store a pointer to the then current
| threadstate.

Why are there multiple thread states, then?  If we might as well just
use the existing state of any thread, it seems like we are put to a
lot of trouble to hunt one up.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list