<div dir="ltr">Hi Andrew,<div><br></div><div>It wasn't blocked on IO, the server got stuck in it's mainloop (or similar name). I don't know much about webservers, WSGIservers etc, but what i also tried was putting a schedule() in this mainloop (which i think polls the socket). Is this what you suggest? It seems to work well, apart from the occasional weird AttributeError, which i'll have to look into. However others discouraged this approach, but i never quite understood why. </div>
<div><br></div><div>Cheers, Lars</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Dec 6, 2013 at 7:40 PM, Andrew Francis <span dir="ltr"><<a href="mailto:andrewfr_ice@yahoo.com" target="_blank">andrewfr_ice@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif"><div>
<div><div style="font-size:12pt;font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif"><div><span>Hi Lars:</span></div><div style="display:block"><div><div><div dir="ltr" style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:12pt">
<br></div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:12pt">Message: 1<br>Date: Thu, 5 Dec 2013 22:07:20
 +0100<br>From: lars van Gemerden <<a rel="nofollow" href="mailto:lars@rational-it.com" target="_blank">lars@rational-it.com</a>><br>To: The Stackless Python Mailing List <<a rel="nofollow" href="mailto:stackless@stackless.com" target="_blank">stackless@stackless.com</a>><br>
Subject: Re: [Stackless] monkeypatching<br>Message-ID:<br>    <CAP8kt8yLp1P46DeZfdBwkeTvWmbWFXbAra+<a rel="nofollow" href="mailto:MSxViXhuWXj0Fsw@mail.gmail.com" target="_blank">MSxViXhuWXj0Fsw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="windows-1252"<br><br>>(oh, i created a tasklet for the bottle microframework run() method, which<br>>includes the mainn server loop()) ; I only called schedule() on
 each web<br>>server request to be able to do anything outside the server mainloop.<br>>However that had the
 effect that process steps where not executed as >long as the end user sent no requests (some processes do not have any >web component).<br></div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:12pt">
<br></div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:12pt">I haven't had a chance to carefully look at your code. However from this description, it sounds like a thread/tasklet is blocked on I/O.  This will have the effect of blocking all tasklets in that thread. What you need to do is occasionally call a timeout from the underlying system call (for example, select()) and do a schedule() so other tasklets can
 run.</div><div> <br></div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:12pt">Cheers,</div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:12pt">
Andrew</div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:12pt"><br></div><div style="font-family:HelveticaNeue,'Helvetica Neue',Helvetica,Arial,'Lucida Grande',sans-serif;font-size:12pt">
P.S - Yahoo's new and improved mail interface is killing me!</div>  </div> </div>  </div> </div></div></div></div></div><br>_______________________________________________<br>
Stackless mailing list<br>
<a href="mailto:Stackless@stackless.com">Stackless@stackless.com</a><br>
<a href="http://www.stackless.com/mailman/listinfo/stackless" target="_blank">http://www.stackless.com/mailman/listinfo/stackless</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br>====================================<br>
Lars van Gemerden<br><a href="mailto:lars@rational-it.com">lars@rational-it.com</a><br>+31 6 26 88 55 39<br>====================================
</div>