Thanks for the answer, really helped, but I'm stuck again in other case.<div><a href="http://stackoverflow.com/questions/9335509/using-wsgi-on-twisted">http://stackoverflow.com/questions/9335509/using-wsgi-on-twisted</a></div>
<div>I'm using mod_wsgi now, and I'm really lost about how to use twisted methods.</div><div><br></div><div>Thanks again!</div><div><br></div><div><br></div><div><br><br><div class="gmail_quote">2012/2/16 <span dir="ltr"><<a href="mailto:exarkun@twistedmatrix.com">exarkun@twistedmatrix.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 12:26 pm, <a href="mailto:joaoricardo000@gmail.com">joaoricardo000@gmail.com</a> wrote:<br>
>[snip]<br>
<div class="im">><br>
>def doStuff(self,d,msg):<br>
> # do some stuff<br>
> time.sleep(2) #just for example<br>
> d.callback('ok')<br>
><br>
</div>>[snip]<br>
<div class="im">>So far, so good, but, the HTTP response (return 'done'), only happens<br>
>after<br>
>the delay (time.sleep(2)). I can tell this, because the browser keeps<br>
>'loading' for 2 seconds.<br>
><br>
>What am I doing wrong?<br>
<br>
</div>Answered on Stack Overflow:<br>
<br>
<a href="http://stackoverflow.com/questions/9310350/twisted-non-blocking-method-" target="_blank">http://stackoverflow.com/questions/9310350/twisted-non-blocking-method-</a><br>
how-to<br>
<div class="im">>Found some answer saying that wsgi twisted does not suport assync, and<br>
>maybe Tornado could do this. ... is that true?<br>
<br>
</div>By definition, WSGI applications are not asynchronous. However, your<br>
code is not a WSGI application, so the nature of WSGI applications is<br>
irrelevant.<br>
<br>
Tornado doesn't change these facts. WSGI for Tornado is the same as<br>
WSGI for anything else.<br>
<br>
Jean-Paul<br>
<br>
_______________________________________________<br>
Twisted-web mailing list<br>
<a href="mailto:Twisted-web@twistedmatrix.com">Twisted-web@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><b>João Ricardo Mattos e Silva</b><br><br><span style="font-size:x-small">Graduando em Ciência da Computação na Universidade Federal de Santa Catarina<br></span><br>
<b><font face="'courier new', monospace">Cel: </font></b><font face="'courier new', monospace">+55 (48) 96190063 | <b>Skype:</b> jricardomsilva | <b> Msn: </b><a href="mailto:joaoricardo@globalite.com.br" target="_blank">joaoricardo@globalite.com.br</a></font><br>
</div>