## 问题

I/O多路复用之epoll一文简单介绍了I/O多路复用模型。I/O多路复用的API函数返回就绪（ready）的文件描述符，在这些文件描述符上执行readwrite都不会阻塞。那么即使描述符是默认的阻塞方式，调用读写函数应该也不会阻塞。

## 边沿触发

I/O多路复用之epoll一文有描述一种情况：当使用epoll的边沿触发模式时，必须要将描述符设置为非阻塞。

## 内核bug

Under Linux, select() may report a socket file descriptor as "ready for reading", while nevertheless a subsequent read blocks. This could for example happen when data has arrived but upon examination has wrong checksum and is discarded. There may be other circumstances in which a file descriptor is spuriously reported as ready. Thus it may be safer to use O_NONBLOCK on sockets that should not block.