[Stackless] I need Input (was: Stackless breaks generators that do not yield)

Christian Tismer tismer at tismer.com
Wed Mar 19 21:56:01 CET 2003


Sune Kirkeby wrote:
> [ Christian Tismer ]

[who owns the frame]

> If I understand this correctly function-call/return would work much
> the same as it does now, with the caller being deactivated (via
> unwinding) at call-time and reactivated again when the callee
> returns?
> 
> If so, I think I would let the caller decref the callee-frame when
> the caller is being reactivated (and after it has done any
> inspection it needs to do). To me caller-decrefs seems the simpler
> semantic of the two.

After some changes and some more debugging (had to change
some deeper refcount semantics, to make PCbuild/tasktest.py
run without leaks), I checked your version into CVS.
Well, actually I don't use PUSH and POP, but f_temp_val
to hold the called frame.

For the normal cases, your approach works fine, but it
also has the drawback that it binds the semantics of
an appearing Py_UnwindToken, that there is always a new
frame being called. This needn't be true, it could
also be a CFunction that simply does a task switch.
In order to keep that simple, I allowed f_temp_val
to be NULL. The switching function can take care
of these special cases. Maybe it turns out to be not
necessary, we will see than when implementing the
"soft" transfer functions.

Thanks, everyhing looks cleaner now.

ciao - chris
-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
      whom do you want to sponsor today?   http://www.stackless.com/

_______________________________________________
Stackless mailing list
Stackless at www.tismer.com
http://www.tismer.com/mailman/listinfo/stackless




More information about the Stackless mailing list