Hi Paul:
>Message: 7
>Date: Tue, 17 Mar 2009 09:59:09 +0100
>From: Paul Sijben <[email protected]>
>Subject: Re: [Stackless] stackless inter-thread queues
>To: Richard Tew <[email protected]>
>Cc: [email protected]
>Message-ID: <[email protected]>
>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:
stackless.schedule()
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.
Cheers,
Andrew
_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless