<div>Hi all,</div>
<div> </div>
<div>No joy as yet. The Stackless channels do set up the second queue in my note already, but they are many-to-many, which means in-tasklet ALT or select may not behave as hoped: a ready communication may still not win its branch, and the "other" branch may deschedule, thus letting another tasklet steal the communication.</div>
<div> </div>
<div>The "hardware" channel ought to be doable, though, as long as it is unidirectional, since the first tasklet in the queue should never reschedule until its communication is done. Thus the in-virtual-machine select should be achievable, though I have not worked out details, because the structures and code are highly complex, especially when exceptions are considered.</div>
<div> </div>
<div>Larry<br> </div>
<div><span class="gmail_quote">On 10/10/08, <b class="gmail_sendername">Larry Dickson</b> <<a href="mailto:ldickson@cuttedge.com">ldickson@cuttedge.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><br><br>
<div><span class="q"><span class="gmail_quote">On 10/10/08, <b class="gmail_sendername">Arnar Birgisson</b> <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:arnarbi@gmail.com" target="_blank">arnarbi@gmail.com</a>> wrote:</span> </span><span class="q">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Larry,<br><br>On Fri, Oct 10, 2008 at 18:48, Larry Dickson <<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ldickson@cuttedge.com" target="_blank">ldickson@cuttedge.com</a>> wrote:<br>
> These address the same problem, but shift to module variants what is<br>> actually a virtual machine issue. What happens if different tasklets use<br>> different modules in the same run?<br><br>Depends on the modules. If each module has its own dispatching tasklet<br>
it shouldn't be a problem - but these are not all compatible<br>(different platforms, threading etc.)<br><br>> My point is that there doesn't need to be a wheel at all. No change in<br>> source code.<br><br>
Hmm, don't see what you mean. What source code doesn't need to change?</blockquote>
<div> </div></span>
<div>Sorry, I was unclear. I meant Stackless source code for tasklets, not source code for the virtual machine.</div><span class="q">
<div> </div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">> Can two tasklets use the libevent code and have their sleep periods overlap?<br><br>Yes<br><br><br>> Where is the C source for the virtual machine?<br>
<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://zope.stackless.com/svn/sdocument_view" target="_blank">http://zope.stackless.com/svn/sdocument_view</a><br><br>> What is preferred, do you think: a call and explicit check on the lines of<br>
> select, or a syntax thing that would act like (or maybe even be) a case<br>> statement?<br><br>Surely not a syntax thing, Stackless currently does not add any new<br>syntax to Python. I imagine something like<br><br>
val = stackless.receive_first([chan1, chan2, ....])<br><br>Look in the archives for discussion of the syntax.</blockquote>
<div> </div></span>
<div>Thanks. I will look at the C source and the archives this weekend.</div>
<div> </div>
<div>Larry</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">cheers,<br>Arnar<br></blockquote></div><br></blockquote></div><br>