[Twisted-web] Re: [Web-SIG] WSGI woes
dp at ulaluma.com
Fri Sep 17 02:39:36 CEST 2004
On Sep 16, 2004, at 1:41 PM, Phillip J. Eby wrote:
> resume = environ['wsgi.pause_output']()
> Where 'resume' is then a callback function that can be invoked to
> resume iteration. This keeps it to a single extension key, helps
> ensure the correct sequence of actions, and makes it easier to
> implement in some cases, while not making other cases any harder.
Well, I guess I sparked some discussion here. Great! I am +1 on the
above construct, calling pause_output and yielding an empty string. I'm
glad this technique came up because I hadn't paid enough attention to
the environ dict and how it could be used to do something like this.
I think with servers providing a pause_output callable like this,
asynchronous applications will be possible and the isolation between
the layers can be preserved. I am going to try writing some code using
this construct and provide further feedback after I do.
More information about the Web-SIG