[Stackless] More on a Stackless Select

Christian Tismer tismer at stackless.com
Sat Apr 17 05:55:56 CEST 2010


.....
>> I think for prototyping you should try to implement
>> multi-channels on top of channels. You need to use a tasklet
>> per channelthat does this communication. The point is to wake up when any>of the channels becomes active. Then all other waiting helper
>> tasklet  get an exception to quit.
>>      
> A tasklet per channel is not necessary. I posted in go-language-nuts
> and got responses from Rob Pike, Russ Cox and Ian Taylor. Internally Stackless, Newsqueak, Limbo, and Go are different. However Russ gave me enough information for me to figure out what I was doing wrong and
> implement a solution that does not involve playing with priorites (i.e., forcing the selector tasklet to immediately schedule). So far it is looking good but I need to run more tests to make sure I am out of the
> woods.
If you are using real channels to implement channel sets, and you
are not going to change the C code, then you definately need
one tasklet per channel, that blocks on it until there is activity.
Then the tasklet cleans up what is needed to clean up, and sends
or receives on the channel where the target tasklet is waiting on.

Priorities? Forget it. The logic must work without, first.
Multichannels can be expressed with single channels. I showed
this a few years ago, but the code is gone. It is straight forward.

ciao - chris

-- 
Christian Tismer             :^)<mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9A     :    *Starship* http://starship.python.net/
14109 Berlin                 :     PGP key ->  http://wwwkeys.pgp.net/
work +49 30 802 86 56  mobile +49 173 24 18 776  fax +49 30 80 90 57 05
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/




More information about the Stackless mailing list