select.poll.poll() never blocks

birdsong david.birdsong at gmail.com
Thu Feb 12 02:14:25 EST 2009


On Feb 11, 10:36 pm, "Hendrik van Rooyen" <m... at microcorp.co.za>
wrote:
> "birdsong" <dav... at gmail.com>wrote:
>
> 8<----------- select not blocking on empty file stuff -----------------
>
> > Any help on what I'm missing would be appreciated.
>
> Why do you expect it to block?
> It is ready to read, to return end of file.
>
I expected it to block because of the name and meaning of the flag,
POLLIN, which I thought meant new data has arrived to be read.  Since
I only registered a single file descriptor, I would have expected poll
to not return until there was new data to be read.  I understand now
that it is not the case.



More information about the Python-list mailing list