[Stackless] tasklets / greenlets vs. threads / microthreads

Andy Sy andy at nospam.com
Wed Mar 17 02:47:30 CET 2004

Christian Tismer wrote:

> In Stackless 2.0, tasklets could not do pre-emptive scheduling,
> because I had no good criterion when to wllow and forbid it.
> In Stackless 3.0 it is possible again, since the non-recursive
> interpreter calls give me some measure of an "innocent" state.
> Richard Emslie implemented pre-emptive scheduling in the
> sprint, and it is of course possible (and a planned task)
> to implement microthreads on top of that.
 > Tasklets are meant in a way like a simplified subset of
 > threads, and by design they are chained together into
 > a circular list for round-robin scheduling.

Since you're saying one might want to build microthreads on top
of tasklets, that would imply that tasklets are more primitive.
What don't tasklets do that microthreads can?

> Yes, greenlets will be the building block for tasklets
> and microthreads.

So greenlets will end up becoming the fundamental (atomic, if
you will) flow control construct provided by Stackless (like
continuations used to be)?  Are greenlets as general as

P.S. no need to CC to my private email...

Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list