[Python-Dev] asyncore fixes in Python 2.6 broke Zope's version of medusa

Greg Ewing greg.ewing at canterbury.ac.nz
Fri Mar 6 11:01:35 CET 2009

Hrvoje Niksic wrote:

>        Under Linux, select() may report a socket file descriptor
>        as "ready for reading",  while  nevertheless
>        a subsequent read blocks.

Blarg. Linux is broken, then. This should not happen.

>        This could for example
>        happen when data has arrived but upon
>        examination has wrong checksum and is discarded.

That's no excuse -- the kernel should check all its
checksums *before* waking up selecting processes!

> Even if you don't agree that using O_NONBLOCK with select/poll is the 
> best approach to non-blocking, I think there is enough existing practice 
> of doing this to warrant separate consideration of non-blocking sockets 
> (in the OS sense) and select/poll.

I'm not saying there isn't merit in having support for
non-blocking file descriptors, only that it's not in
any sense a prerequisite or first step towards a
select/poll wrapper. They're orthogonal issues, even
if you might sometimes want to use them together.


More information about the Python-Dev mailing list