Phillip J. Eby ha scritto:
> At 11:04 AM 10/6/2007 +0200, Manlio Perillo wrote:
>> As an example, the WSGI write callable cannot be implemented in a
>> conforming way in Nginx.
> 
> ...unless you use a separate thread or process.
> 

I'm insisting about asynchronous support in WSGI because
Nginx *does not supports threads*.

It has some thread support but it is *broken*.
Even if in future the problems are solved, the threading model of Nginx 
*will break* many existing WSGI applications, since the WSGI iteration 
can be resumed in different threads.

Of course, a WSGI application can use threads, but i think that it 
*needs* a wsgi.pause_output extension, for synchronization.

 > [...]
>> Another possible solution is that reading from input is allowed to raise
>> an EAGAIN exception, like in the previous example.
> 
> Which is *way* more complex than the CPS approach.  If we're going to 
> make it *harder* to write applications, there's no point to having a 
> WSGI 2.0, since 1.0 is already hard enough to implement.  :)
> 

It is a know fact that asynchronous programming is hard.
Multithread programming is even more harder, but nobody seems to care.



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

Reply via email to