<div>Hi Arnar,</div>
<div> </div>
<div>I was being really brain-dead, of course, when I started going on about interrupt coding. You don't have to do any. C select does all that for you, just as shown in your own code snippet for time.sleep...<br> </div>
<div><span class="gmail_quote">On 10/3/08, <b class="gmail_sendername">Arnar Birgisson</b> <<a href="mailto:arnarbi@gmail.com">arnarbi@gmail.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hey Larry,<br><br>On Fri, Oct 3, 2008 at 20:56, Larry Dickson <<a href="mailto:ldickson@cuttedge.com">ldickson@cuttedge.com</a>> wrote:<br>
> Am I right, that your answer to (1) is that Tasklet L is the one with<br>> "event.loop(TRUE)" and that that is the call that continually checks<br>> readiness for other tasklets?<br><br>Yes, that is correct.<br>
<br>> The "elaborate handler when select comes out of the block" is really pretty<br>> trivial, and was done decades ago by Inmos - who recorded a bit-by-bit<br>> description of their absolutely robust implementation. They actually solved<br>
> a tougher problem, which was to let you code a multi-way branch in a single<br>> process (not just select the winning process with one stimulus to each, as<br>> we have been discussing), and included timers too.<br>
><br>> Your implementation of time.sleep looks like it's interrupt-based, so I<br>> guess you have a fast clock on your motherboard, unless C select is coded<br>> pretty weirdly.<br><br>Just to be clear, it is not *mine*, it is from the CPython source.</blockquote>
<div> </div>
<div>Ah, the ambiguity of English "you" - I meant "the implementation of you Stackless coders" - then confused it by adding "thou hast a fast clock on thy motherboard" ;-)</div><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">> This particular kind of interrupts and locking code is not as hard as you<br>> think, because it only has to serialize the queue manipulation for something<br>
> you completely control - the Stackless virtual machine. I did it in DOS ages<br>> ago, and the Inmos documentation exhaustively lists what is needed, which<br>> isn't much (currently the "Transterpreter" project works off that). It's<br>
> your call, of course, but I think readiness queueing is much cleaner without<br>> requiring a timer poll loop.<br><br>I'd be interested to see an implementation :)</blockquote>
<div> </div>
<div>I'll put some notes together over the weekend and send them along - I have to pull it out of non-digital 1988 references.</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>