[Web-SIG] [RFC] x-wsgiorg.suspend extension

Manlio Perillo manlio_perillo at libero.it
Mon Apr 12 16:39:51 CEST 2010


P.J. Eby ha scritto:
> At 01:25 PM 4/12/2010 +0200, Manlio Perillo wrote:
>> The purpose of the extension if to just have a standard interface that
>> WSGI applications can use to take advantage of the possibility, offered
>> by asynchronous server, to suspend execution and resume it later.
> 
> WSGI has this ability now - it's yielding an empty string.  Yielding an
> empty string is a hint to the server that the application is not ready
> to send any output, and the server is free to schedule other
> applications next.  And WSGI does not require the application to be
> rescheduled any time soon.
> 
> In other words, if saying "don't call me for a while" is the purpose of
> the extension, it is not needed.  As Graham says, the thing that would
> actually be needed is a way to tell the server when to poll the app again.
> 

Just yielding an empty string does not give the server some important
informations.

As an example, with x-wsgi.suspend application can specify a timeout,
that tells the server that the application must be resumed before
timeout milliseconds have elapsed.

And x-wsgi.suspend returns a callable that, when called, tell the server
to poll the app again.


Regards  Manlio


More information about the Web-SIG mailing list