On Thu, Sep 4, 2008 at 9:59 AM, Richard Tew <[EMAIL PROTECTED]> wrote: > On Wed, Sep 3, 2008 at 4:08 PM, Jay Shaffstall <[EMAIL PROTECTED]> wrote: >> I'd thought that each tasklet would run once, round robin style, with >> all others getting run once before the first ran again. A tasklet >> that tried to receive on an empty channel would block, and when >> another tasklet sent to that channel the first would unblock and go >> back into the round robin queue. >> >> Am I misunderstanding how stackless works? Because what I think I'm >> seeing is that the receiving tasklet runs immediately. I don't have >> any call to stackless.run, but as soon as I call send on a channel, >> the receiving tasklet runs, rather than having the send queue up until >> the tasklet is next up to run. > > This behaviour is defined by the 'preference' attribute of the channel: > >>>> help(stackless.channel.preference) > Help on getset descriptor __builtin__.channel.preference: > > preference > -1 prefer receiver (default), 1 prefer sender, 0 don't > prefer anything. See also schedule_all > > You probably want to set it to 1 for your channel.
Thanks, Richard! I'll give that a try and see how it works. Jay _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
