ANN: Stackless Python 0.2
G. David Kuhlman
dkuhlman at netcom.com
Mon Jun 28 14:46:53 EDT 1999
Tim Peters (tim_one at email.msn.com) wrote:
>
> That's mostly true today too: Python threads run serially now, one at a
> time, and if a thread calling out to C doesn't release the global lock no
> other thread will run until it returns.
>
I'll bite. How *does* a thread that calls out to C release the global
lock?
Would it have to do this thingy that is at the beginning of the
interpreter loop in python/ceval.c?
if (PyThreadState_Swap(NULL) != tstate)
Py_FatalError("ceval: tstate mix-up");
PyThread_release_lock(interpreter_lock);
Would this work? or would it screw up the interpreter?
Is there a way to do this in a Python script *before* it calls out
to C.
Is there an approved solution to this problem?
- (mystified) Dave
More information about the Python-list
mailing list