[Twisted-web] Re: [Web-SIG] WSGI - alternate ideas, part II

Phillip J. Eby pje at telecommunity.com
Thu Sep 16 09:14:47 MDT 2004

At 08:02 AM 9/16/04 -0400, Peter Hunt wrote:
>I think that the application should be passed a finish() method as a
>parameter or start_response return value. If the WSGI application is
>not a generator and returns wsgi.NOT_DONE_YET (similar to
>Twisted.web's NOT_DONE_YET), it is required to call finish().
>Otherwise, the gateway will call finish() after the generator is
>finished or a string value is returned.
>That way, one could do all of the deferred calls they want, and simply
>return NOT_DONE_YET and call finish().
>How does that sound?

Way too complicated in the general case.  I'd prefer a solution that 
doesn't excessively complicate middleware or synchronous servers, just to 
support asynchronous applications that are unlikely to be portable anyway.

More information about the Twisted-web mailing list