Hello Colleagues:

> Message: 1
> Date: Mon, 13 Oct 2008 07:43:53 -0700
> From: "Larry Dickson"
> <[EMAIL PROTECTED]>
> Subject: 
> To: "Arnar Birgisson" <[EMAIL PROTECTED]>
> Cc: [email protected]
> Message-ID:
>       <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="iso-8859-1"

> No joy as yet. The Stackless channels do set up the second
> queue in my note already, 

...

>> Surely not a syntax thing, Stackless currently
>> does not add any new syntax to Python. I imagine something like
>>
>> val = stackless.receive_first([chan1, chan2,....])
>>
> >> Look in the archives for discussion of the syntax.

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.

Cheers,
Andrew











      

_______________________________________________
Stackless mailing list
[email protected]
http://www.stackless.com/mailman/listinfo/stackless

Reply via email to