On Tue, Apr 19, 2011 at 1:34 AM, Dave Butler <span dir="ltr"><<a href="mailto:dave@hoppit.net">dave@hoppit.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I've browsed through some of the stackless code, and I'm not entirely sure what is happening in there.  It appears to me that when data is received on a channel, it immediately fires off the rest of the function rather than scheduling it for execution?  I may be entirely wrong here...<br>

<br>
Has anyone encountered this at all?  I'm happy to delve into and make changes to the stackless code if necessary, or if someone knows a better method to achieve the same thing I would appreciate any pointers.  I would prefer to go under the assumption that script-writers do NOT know how stackless works and should not be required to do any cooperative scheduling themselves.  Feel free to let me know if I was unclear on any particular points.<br>
</blockquote><div><br></div><div>Hi Dave,</div><div><br></div><div>How a channel behaves with regard to scheduling when an operation is performed on it, is determined by its preference attribute.  See this entry:</div><div>
<br></div><div>  <a href="http://disinterest.org/resource/stackless/2.6-docs-html/library/stackless/channels.html#channel.preference">http://disinterest.org/resource/stackless/2.6-docs-html/library/stackless/channels.html#channel.preference</a></div>
<div><br></div><div>And this entry:</div><div><br></div><div>  <a href="http://disinterest.org/resource/stackless/2.6-docs-html/library/stackless/channels.html#channel.schedule_all">http://disinterest.org/resource/stackless/2.6-docs-html/library/stackless/channels.html#channel.schedule_all</a></div>
<div><br></div><div>Cheers,</div><div>Richard. </div></div>