[Stackless] Stackless API

Christian Tismer tismer at stackless.com
Tue Feb 3 05:45:32 CET 2004


Arman Bostani wrote:

> arman>> * If the tasklet has a single frame and it performs a python 
> "return",
> arman>>   the caller of tasklet.run gets the return value.
> 
> tismer> What is the caller. What is the caller?
> tismer> You might think that run() defines the caller. But run() is
> tismer> an artificial thing at the moment, just there to make sure
> tismer> that the spelled tasklet is run right now.
> tismer> We might have to re-consider run(), if it should carry semantics
> tismer> like being a real caller.
> tismer> Again, I need this discussion on the mailing list!
> 
> Yes, I consider the caller of run() to be the "caller".

[and many considerations and complaints followed...]

Ok, I did the simplest possibole compromise for the
moment, which allows you to "get at the return value"
of any tasklet.
The last returned value of the frasmes which constitute
a frame is no longer discarded, but assigned to the tasklet's
tempval field. Given that you are holding a reference to your
tasklet, you are always able to pick up this return value.

This solution doesn't hurt anybody and most probably doesn't
break any code.

cheers - chris

p.s.: Next to come: pdb support

-- 
Christian Tismer             :^)   <mailto:tismer at stackless.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  mobile +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 stackless.com
http://www.stackless.com/mailman/listinfo/stackless



More information about the Stackless mailing list