[Stackless] Stackless based replacement

Larry Dickson ldickson at cuttedge.com
Tue Oct 14 16:11:25 CEST 2008


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?

Larry

On 10/14/08, Andrew Francis <andrewfr_ice at yahoo.com> wrote:
>
> Hello Colleagues:
>
> > Message: 1
> > Date: Mon, 13 Oct 2008 07:43:53 -0700
> > From: "Larry Dickson"
> > <ldickson at cuttedge.com>
> > Subject:
> > To: "Arnar Birgisson" <arnarbi at gmail.com>
> > Cc: stackless at stackless.com
> > Message-ID:
> >       <1c748a490810130743o4ce691f6s8653df6baed3965b at mail.gmail.com>
> > 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
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.stackless.com/pipermail/stackless/attachments/20081014/64105ddb/attachment.htm>


More information about the Stackless mailing list