Why having to use non-blocking fd in a edge triggered epoll function?

前端 未结 3 651
鱼传尺愫
鱼传尺愫 2021-02-10 01:29

I read document abount edge triggered epoll function in web as follows:

1. The file descriptor that represents the read side of a pipe (rfd) is registered on the         


        
3条回答
  •  误落风尘
    2021-02-10 02:02

    You must read all or write all the data on epoll's ET mode, because the et mode triggered once after the flag changed. When you have read all data, the thread must be hang if you use the block read or write. So that nonblocking must be used.

提交回复
热议问题