Phillip J. Eby ha scritto: > [...] >> I have read a lot of archived messages, and all I have seen are >> *discussions* about asynchronous extensions, but no working >> implementations. > > Because nobody came up with anything particularly useful. While it's > possible to have generic extensions for pausing and resuming iteration, > those aren't useful enough to write a fully asynchronous application. > You still have to block and/or poll in order to do anything else. > Meanwhile, since applications *can* block, they have to be in a separate > thread or process from an async server anyway. So all that asynchrony > does is free up the thread or process to handle something else... which > is wasted if the app is not in an async server. >
For nginx mod_wsgi I'm planning to add support to blocking application,executing them in a thread (*but* there will be only one thread per process, and the entire result will be buffered). Threaded execution will be disabled by default, and can be enabled using an option. To add support to asynchronous WSGI application, I will try to implement the pause_output extension and, more important, I will expose the nginx event API to the WSGI application, writing an extension module. The API will be low level, but once this API will be implemented, it should be possibile to implement a common and standardized API, that will works with nginx mod_wsgi and Twisted. > [...] Regards Manlio Perillo _______________________________________________ Web-SIG mailing list Web-SIG@python.org Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/archive%40mail-archive.com