Ann: Stackless Limbo Dancing Works Fine!

Christian Tismer tismer at tismer.com
Mon May 20 20:26:45 EDT 2002


Fernando Pereira wrote:
> On 5/20/02 3:51 AM, "Christian Tismer" <tismer at tismer.com> wrote:
> 
> 
>>This is where I stumbled. For me, it was only one
>>task, waiting for multiple channels. But well, this
>>was just a special case of PAR which I saw in LIMBO.
>>Limbo has a special case where you wait on an array
>>of channels, all for input.
> 
> I'm a bit confused here. There is no PAR in Limbo, just ALT

Sorry about this -- of course I meant ALT.

>     alt { channel-expr1 => statement1; channel-expr2 => statement2; ... }
> 
> The special case you mention is a channel-expression in which the channel is
> actually an array of channels of the same type, which is a special case of
> the above: perform the channel-expression with the first element of the
> array to be ready.

Yes, exactly.

>>The more general case has different code for every
>>branch, and these code pieces appear to be again
>>tiny tasks, right?
> 
> I agree that it's overkill to create tasks for all the branches of an ALT,
> which would be required in a direct implementation of the Cardelli scheme I
> referred to. 

Ok, but this way I now understand what he meant.
Things are clearing up for me.

...

> In Cardelli's scheme (the first paper I mentioned, not the C# one) ALT and
> PAR are implemented in almost the same way. The only difference is that all
> the communication requests coming from the guards in the ALT are put in a
> mutual exclusion pool. This scheme is very general is that it doesn't assume
> single readers or writers on channels, or immediate matching of read and
> write requests (thus each channel may have multiple pending reads and writes
> queued up).

Yes, I understand much more now. The pool approach seems
to be reasonable. Many many thanks! I have to reconsider
things again.

The C# article btw. was *incredibly* interesting. Too bad,
I see no chance yet to squeeze this into Python,
since the idea of chords is really fascinating.
But it appears to make sense with syntactical
support, only. ?

cheers - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     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 89 09 53 34  home +49 30 802 86 56  pager +49 173 24 18 776
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 Python-list mailing list