[Python-Dev] Re: [Stackless] comments on PEP 219

Christian Tismer tismer@tismer.com
Tue, 20 Mar 2001 06:15:01 +0100


Greg Ewing wrote:
> 
> Christian Tismer <tismer@tismer.com>:
> 
> > It does not
> > matter how and where frames were created, it is just impossible
> > to jump at a frame that is held by an interpreter on the C stack.
> 
> I think I need a clearer idea of what it means for a frame
> to be "held by an interpreter".
> 
> I gather that each frame has a lock flag. How and when does
> this flag get set and cleared?

Assume a frame F being executed by an interpreter A.
Now, if this frame calls a function, which in turn
starts another interpreter B, this hides interpreter
A on the C stack. Frame F cannot be run by anything
until interpreter B is finished.
Exactly in this situation, frame F has its lock set,
to prevend crashes.
Such a locked frame cannot be a switch target.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer@tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net/
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
     where do you want to jump today?   http://www.stackless.com/