How to write a non blocking SimpleHTTPRequestHandler ?

Yassine Chaouche yacinechaouche at yahoo.com
Tue Feb 3 07:56:17 EST 2015


On Tuesday, February 3, 2015 at 12:35:32 PM UTC+1, Marko Rauhamaa wrote:

> So far I've been happy with select.epoll(), socket.socket() and ten
> fingers.
> Marko

There's already software written to take care of much of the HTTP stuff protocol stuff, the headers etc. I wouldn't rewrite it. I prefer to monkey patch parts of existing code rather then rewrite all of it.

But your comment is interesting because, as I understand it, a non-blocking web server is simply a matter of setting timeouts on sockets, catch the exceptions and move on. I don't know why wouldn't that be possible with python stdlib ?


> The standard library and nonblocking can't be used in the same sentence. 

?



More information about the Python-list mailing list