On Sep 20, 2011, at 3:33 PM, Jeroen van Veen wrote: > 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? > (https://github.com/phrearch/hwios/blob/master/services/web_ui/service.py)
Generally, yes, except for the "MainThreadWSGIResource" part. First of all: you're taking your life in your own hands when you use a Twisted API that starts with a single underscore :-). http://twistedmatrix.com/trac/wiki/CompatibilityPolicy Second, _WSGIResponse _does_ run the response in a thread; your code isn'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 'callInThread' just calls the given callable on the main thread. +1 for having a "plasmoids" module, by the way - does this software control a magnetically regulated plasma reaction at some point? :). -glyph
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python