On Fri, May 24, 2013 at 12:05 PM, Manuele Pesenti <manuele.pese...@gmail.com > wrote:
> Hi! > > Starting from the fact that using the anyserver script web2py can be run > under twistedmatrix web server... is it possible to combine web2py with > twisted async way of programming? > > You can't, according to this http://twistedmatrix.com/documents/12.3.0/web/howto/web-in-60/wsgi.html: """ Note that WSGIResource is a multithreaded WSGI container. Like any other WSGI container, you can't do anything asynchronous in your WSGI applications, even though this is a Twisted WSGI container """ If you want to stay in WSGI land you need to use something that is built around greenlets or around the enhanced generators. Probably your best bet, currently, is using gevent with monkey patch. And if your are querying a database you should use a pure python driver implementation to be able to be monkey patched by gevent. Ricardo -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.