[Stackless] multiple channel waits
aaron at reportlab.com
Thu Aug 15 17:16:37 CEST 2002
> Multiple channel wait is hard for me to understand completely.
> I want to do it right, once and forever. I need to do a KQueue
> like formulation. KQueue is unbeatable.
We're opposites. KQueue is hard for me to understand. Multiple channel
waits are easy.
In Limbo the semantics was that you wait on any number of channels
and when some of them become available you get one channel back
(if I recall correctly). That way if there are 5 tasklets each waiting on
the same 5 channels they all can be made runnable at once if all
full.. Higher level programming tricks are needed to prevent things
like starvation, etcetera. I think this is a reasonable approach for the
(chosenChannel, message) = stackless.receiveFromChoice([c1, c2,
blocks until one or more of the cns is available and assigns one to this
tasklet, returns the chosen channel and the message sent on the channel.
-- Aaron Watters
ps: I'm beginning to fantasize about things like robotics and factory
floor automation with this stuff :).
Stackless mailing list
Stackless at www.tismer.com
More information about the Stackless