[Stackless] Giving names for tasklets

Richard Tew richard.m.tew at gmail.com
Fri Jun 30 22:17:26 CEST 2006


On 6/30/06, Juho Mäkinen <juho.makinen at gmail.com> wrote:
> > But I think more extensive changes are required.  The
> > instance dictionary and any slots are not persisted.  And also
> > it looks like channel pickling has the same limitations.
>
> We'll see about that. I believe, that currently stackless does not give enough
> ready-to-use tools to develop complex tasklet systems with pickling,
> and more high-level tools are needed.

Can you list what is not working the way you want it?

As I pointed out to Andrew, you can add and remove tasklets
to and from channels, using the method I showed in this mail:
http://www.stackless.com/pipermail/stackless/2006-May/001707.html

> Two extra questions: What is the __slots__ variable and tempval in tasklets
> and what's their function?

__slots__: http://docs.python.org/ref/slots.html
It may be that pickling anything just doesn't pickle these, in which
case I just have to worry about the instance's dictionary.

tempval is used for a lot more, but where you have probably seen me
use it is where the function the tasklet is to be bound to is stored while
the tasklet is waiting to be called with the arguments to pass to that
function.

t = stackless.tasklet(f)
.. now t.tempval is f
t(*args, **args)
.. now f(*args, **args) is ready to run in the scheduler

Richard.

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



More information about the Stackless mailing list