[Stackless] Detaching Tasklets from Channels

Richard Tew richard.m.tew at gmail.com
Thu Aug 10 12:12:03 CEST 2006


On 8/9/06, Andrew Francis <andrewfr_ice at yahoo.com> wrote:
> I noticed that one cannot perform a tasklet.remove()
> on a tasklet that is blocked on a channel.
>
> In the future I would like the ability to pickle
> individual tasklets that are blocked on a channel.
> Example, I have a tasklet that has been waiting a long
> time for I/O, so I would like my scheduler to
> serialise the tasklet to disk. In turn, I would like
> to re-attach the tasklet when there is I/O.

I provided you a way to do this the last time you brought this up:
http://www.stackless.com/pipermail/stackless/2006-May/001707.html

> Is there a theoretical reason while it would be bad to
> add channel.remove(task) and channel.add(task)
> methods? I am assuming those methods exist internally?

Christian gave an opinion on adding methods like this:
http://www.stackless.com/pipermail/stackless/2006-May/001701.html

I share Christian's reticence for making changes, and would
rather you use __reduce__ and __setstate__, perhaps wrapping
them, unless there was a reason you do not want to do this?

If exposing these methods was just a matter of minor work
to expose existing functionality, I would be more than happy
to check in the changes.  But if I recall correctly, this is not
the case.

Richard.

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



More information about the Stackless mailing list