Re: and nicer too - Re: [PATCH] epoll more scalable than poll

Davide Libenzi
2002-10-29T00:41:28Z

On Tue, 29 Oct 2002, bert hubert wrote:

> If that code dares to read immediatly from the fd without having an explicit
> POLLIN event, which also means that epoll can only be used in this fashion
> with nonblocking sockets.

The epoll interface has to be used with non-blocking fds. The EAGAIN
return code from read/write tells you that you can go safely to wait for
events for that fd because you making the read/write to return EAGAIN, you
consumed the whole I/O space for that fd. Consuming the whole I/O space
meant that you brought the signal to zero ( talking in ee terms ), and a
followinf 0->1 transaction will trigger the event. Where 1 means I/O space
available ...

- Davide