<div>Is this essentially different from setting up a many-to-one channel, i.e. a channel which it is illegal for a tasklet to use for input if it is already "registered" as being used for input by another tasklet?</div>
<div> </div>
<div>Larry<br> </div>
<div><span class="gmail_quote">On 10/14/08, <b class="gmail_sendername">Andrew Francis</b> <<a href="mailto:andrewfr_ice@yahoo.com">andrewfr_ice@yahoo.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello Colleagues:<br><br>> Message: 1<br>> Date: Mon, 13 Oct 2008 07:43:53 -0700<br>> From: "Larry Dickson"<br>
> <<a href="mailto:ldickson@cuttedge.com">ldickson@cuttedge.com</a>><br>> Subject:<br>> To: "Arnar Birgisson" <<a href="mailto:arnarbi@gmail.com">arnarbi@gmail.com</a>><br>> Cc: <a href="mailto:stackless@stackless.com">stackless@stackless.com</a><br>
> Message-ID:<br>> <<a href="mailto:1c748a490810130743o4ce691f6s8653df6baed3965b@mail.gmail.com">1c748a490810130743o4ce691f6s8653df6baed3965b@mail.gmail.com</a>><br>> Content-Type: text/plain; charset="iso-8859-1"<br>
<br>> No joy as yet. The Stackless channels do set up the second<br>> queue in my note already,<br><br>...<br><br>>> Surely not a syntax thing, Stackless currently<br>>> does not add any new syntax to Python. I imagine something like<br>
>><br>>> val = stackless.receive_first([chan1, chan2,....])<br>>><br>> >> Look in the archives for discussion of the syntax.<br><br>BPEL (what I work on) has a construct called 'Pick.' I believe a simple way of implementing the aforementioned is to build a synchronizer/semaphore based on a single channel and a counter. The waiting tasklet blocks on the channel. Other tasklets increment (or decrement) a counter. When the counter reaches the desired value, it wakes up the waiting tasklet (with a channel.send()). It is up to the implementer to decide what happens after the synchronizer is 'triggered' or 'signalled' state.<br>
<br>Cheers,<br>Andrew<br><br><br><br><br><br><br><br><br><br><br><br><br><br>_______________________________________________<br>Stackless mailing list<br><a href="mailto:Stackless@stackless.com">Stackless@stackless.com</a><br>
<a href="http://www.stackless.com/mailman/listinfo/stackless">http://www.stackless.com/mailman/listinfo/stackless</a><br></blockquote></div><br>