<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
OK, clear. thanks for the explanation.<br>
<br>
I have currently put a while 1: around run(), that works for now. I am
still getting discarded channel data in there, but I seem not to be
losing anything there.<br>
<br>
Paul<br>
<br>
Christian Tismer wrote:
<blockquote
 cite="mid:5ECDC4F3-F55B-4B0A-A7AB-E3F831123442@stackless.com"
 type="cite"><br>
  <div>
  <div>On 16.07.2007, at 08:54, Paul Sijben wrote:</div>
  <br class="Apple-interchange-newline">
  <blockquote type="cite">
    <div style="margin: 0px;">Christian,</div>
    <div style="margin: 0px; min-height: 14px;"><br>
    </div>
    <div style="margin: 0px;">under which conditions is run supposed to
exit?</div>
  </blockquote>
  <br>
  </div>
  <div>Run first removes main from the runnables.</div>
  <div>Then it is supposed to run until there are no more tasklets</div>
  <div>runnable, that is they are gone, or blocked or whatever.</div>
  <div>Run stops when the runnables circular list is empty.</div>
  <div>It then re-inserts irself (main) and continues.</div>
  <div>It should return None.</div>
  <div><br class="khtml-block-placeholder">
  </div>
  <div>In the case where an integer parameter is given, it runs</div>
  <div>for the number of VM instructions. If there are still</div>
  <div>runnables after the # of ticks (instructions), the current</div>
  <div>tasklet is intercepted and returned as the result of run().</div>
  <div>The idea is to either catch tasklets that went astray,</div>
  <div>or, for small tick counts, to implement pre-emptive</div>
  <div>scheduling (careful with that, not trivial).</div>
  <div><br class="khtml-block-placeholder">
  </div>
  <div>I don't quite remember what happens with exceptions.</div>
  <div>Wel, I thing uncaught exceptions would stop run()</div>
  <div>as well and let the exception propagate into main,</div>
  <div>where you anyway suld put you default exception handler,</div>
  <div>around run().</div>
  <div><br class="khtml-block-placeholder">
  </div>
  <div>ciao - chris</div>
  <br>
  <div> <span class="Apple-style-span"
 style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;"><span
 class="Apple-style-span"
 style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px;">
  <div style="margin: 0px;">--</div>
  <div style="margin: 0px;">Christian Tismer&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;:^)&nbsp;&nbsp;&nbsp;&lt;<a
 moz-do-not-send="true" href="mailto:tismer@stackless.com">mailto:tismer@stackless.com</a>&gt;</div>
  <div style="margin: 0px;">tismerysoft GmbH&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;:&nbsp;&nbsp; &nbsp;&nbsp;Have a
break! Take a ride on Python's</div>
  <div style="margin: 0px;">Johannes-Niemeyer-Weg 9A&nbsp;&nbsp; &nbsp;&nbsp;:&nbsp;
&nbsp;&nbsp;*Starship* <a moz-do-not-send="true"
 href="http://starship.python.net">http://starship.python.net</a>/</div>
  <div style="margin: 0px;">14109 Berlin&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;:&nbsp;&nbsp; &nbsp;&nbsp;PGP key
-&gt; <a moz-do-not-send="true" href="http://wwwkeys.pgp.net">http://wwwkeys.pgp.net</a>/</div>
  <div style="margin: 0px;">work +49 30 802 86 56&nbsp;&nbsp;mobile +49 173 24 18
776&nbsp;&nbsp;fax +49 30 80 90 57 05</div>
  <div style="margin: 0px;">PGP 0x57F3BF04&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;9064 F4E1 D754 C2FF
1619&nbsp;&nbsp;305B C09C 5A3B 57F3 BF04</div>
  <div style="margin: 0px;">&nbsp; &nbsp; &nbsp;&nbsp;whom do you want to sponsor today?&nbsp;&nbsp;&nbsp;<a
 moz-do-not-send="true" href="http://www.stackless.com">http://www.stackless.com</a>/</div>
  <div style="margin: 0px;"><br class="khtml-block-placeholder">
  </div>
  <div><br class="khtml-block-placeholder">
  </div>
  <div><br class="khtml-block-placeholder">
  </div>
  <br class="Apple-interchange-newline">
  </span></span> </div>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Stackless mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Stackless@stackless.com">Stackless@stackless.com</a>
<a class="moz-txt-link-freetext" href="http://www.stackless.com/mailman/listinfo/stackless">http://www.stackless.com/mailman/listinfo/stackless</a></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">-- 
Paul Sijben                                    tel: +31334566488
Eemvalley Technology                     fax: +31334557523
the Netherlands                           <a class="moz-txt-link-freetext" href="http://eemvalley.com">http://eemvalley.com</a>    
</pre>
</body>
</html>