[Stackless] Scheduling Examples, Problems, Solutions, and Questions

Joachim König-Baltes joachim.koenig-baltes at emesgarten.de
Tue Mar 21 16:06:59 CET 2006


On 12/13/05, Andrew Francis <andrewfr_ice at yahoo.com> wrote:
 > Now what is interesting is when I change the stackless
 > channel to Asgeir Ingvarsson's uthread Queue, the
 > problem disappears. I get the proper trace. Asgeir's
 > uthread module is a great source of stackless
 > knowledge.

I'm new to the list and found the above posting when googling
for concepts and differences between stackless channels
and standard python's Queue module (the above comment is
of course about Asgeir's Queue on top of stackless channels.

IMO the fact that stackless channels have no internal buffer
but directly block on send when there's no receiver enlarges the
probability for starvation / deadlock. With a buffer (like in
Asgeir's Queue implementation) you can go on and write to
other channels too or read from them thus avoiding premature
blocking.

What was the reason to _not_ include a buffer for channels? It
would have been nice, if the channels tried to be compatible
(to a certain degree) to the standard Queue modules Queue
class (with a max size for buffer to avoid unlimited process
growth in case no tasklet listens on a channel that gets filled
and filled and filled ...).

I think, channels with buffers ease tasklet programming.

Joachim



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



More information about the Stackless mailing list