[Stackless] stackless inter-thread queues

Andrew Francis andrewfr_ice at yahoo.com
Tue Mar 17 12:38:05 CET 2009

Hi Paul:

>Message: 7
>Date: Tue, 17 Mar 2009 09:59:09 +0100
>From: Paul Sijben <sijben at eemvalley.com>
>Subject: Re: [Stackless] stackless inter-thread queues
>To: Richard Tew <richard.m.tew at gmail.com>
>Cc: stackless at stackless.com
>Message-ID: <49BF665D.20807 at eemvalley.com>
>Content-Type: text/plain; charset="iso-8859-1"

>Hi Richard,

>Being faced with the situation that I need queue-like behaviour, so one
>tasklet needs to be waiting on the channel and in some cases this is the
>only tasklet.

Paul you should be looking to see why other tasklets don't rendezvous with the waiting tasklet's channel? 

>Is there a way I can make a dummy tasklet to be scheduled when there is
>noting else to do? But one that does not load the CPU?

Paul, it has been a while since I played with threads and stackless. I found threads and queues typically hid a design problem. Then again, I haven't used UIs.

I believe to keep the application alive, I did something like:

<your code goes here>

while flag:

in the main tasklet. If there is nothing, only the main tasklet gets scheduled. I believe there is an example in the Stackless Google repository.

Again, I would have to look at the code. However when you need queues and dummy tasklets, it sounds like there is a more straightforward solution.



More information about the Stackless mailing list