<br><br><div class="gmail_quote">2011/9/20 Glyph Lefkowitz <span dir="ltr">&lt;<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div style="word-wrap:break-word"><div><br><div><div>On Sep 20, 2011, at 3:33 PM, Jeroen van Veen wrote:</div><br><blockquote type="cite"><span style="border-collapse:separate;font-family:Menlo;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;font-size:medium">For this websocket cms project im working on, i also run django in a wsgi container. I wonder if im using  it the right way? (<a href="https://github.com/phrearch/hwios/blob/master/services/web_ui/service.py" target="_blank">https://github.com/phrearch/hwios/blob/master/services/web_ui/service.py</a>)</span><br>

</blockquote></div><br></div><div>Generally, yes, except for the &quot;MainThreadWSGIResource&quot; part.</div><div><br></div><div>First of all: you&#39;re taking your life in your own hands when you use a Twisted API that starts with a single underscore :-).  <a href="http://twistedmatrix.com/trac/wiki/CompatibilityPolicy" target="_blank">http://twistedmatrix.com/trac/wiki/CompatibilityPolicy</a></div>

</div></blockquote><div>Yea,  </div><div>I don&#39;t mind :)</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>
Second, _WSGIResponse _does_ run the response in a thread; your code isn&#39;t doing what it claims to be doing.  The right way to do this is not to override the WSGI layer, but to provide a fake threadpool whose &#39;callInThread&#39; just calls the given callable on the main thread.</div>
</div></blockquote><div>Thanks, i&#39;ll try to find out how that works. Not really sure what to callInThread?(the wsgiresponse probably?)</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">
<div><br></div><div>+1 for having a &quot;plasmoids&quot; module, by the way - does this software control a magnetically regulated plasma reaction at some point? :).</div></div></blockquote><div>Thanks for suggesting new terminology for modules :-)  It&#39;s nothing like that though. It&#39;s just a glorified javascript parser</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div></div><font color="#888888"><div>-glyph</div>
<div><br></div></font></div><br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com" target="_blank">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br>