[Stackless] Context Switching and Queues

OvermindDL1 overminddl1 at gmail.com
Tue Sep 4 08:39:45 CEST 2007


In my Pylang library (discussed on one post on the pypy list and very
few places on the net), I always prefer sender, adding an abstraction
slows things down enough that I do not need things slower, and yes,
preferring sender yielded a rather vast improvement in my testing as
well (no numbers readilly accessable, but would be a synch to write up
a test to compare).
On 9/3/07, Andrew Francis <andrewfr_ice at yahoo.com> wrote:
> Hi Richard:
>
> --- Richard Tew <richard.m.tew at gmail.com> wrote:
>
> > Maybe I have skimmed past parts of your post which
> > would suggest this is not the case, but perhaps the
> >'preference' attribute on the channel
> > class will be of help?
> >
> > -1 = prefer receiver  1 = prefer sender  0 no
> > preference
>
> I set channel preference to 1 and yes, the new example
> ran in .09 seconds, as opposed to on average, .3 !
> This is a big improvement.
>
> > I believe if you were to set this to 1 and a
> > receiver was waiting on the other end, the sender
> >would stay the current tasklet and the receiver would
> >be put next in line to be scheduled.
>
> So in my example, the one thousand tasklets are
> unblocked and placed on the runnable list before the
> sender yields. Interesting.
>
> I have to study this more. Thanks a lot for the
> information!
>
> Cheers,
> Andrew
>
>
>
>
> ____________________________________________________________________________________
> Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
> http://answers.yahoo.com/dir/?link=list&sid=396545469
>
> _______________________________________________
> Stackless mailing list
> Stackless at stackless.com
> http://www.stackless.com/mailman/listinfo/stackless
>




More information about the Stackless mailing list