Horizontal trigger processing blocking io of epoll

epoll has two working modes, horizontal trigger and edge trigger. The manual says that when the edge is triggered, the file descriptor must be non-blocking, which I can understand. But why can horizontal triggers handle blocking io?

in horizontal trigger mode, if an io is blocked, we write to the io, and the io blocks all the time, then the process will be blocked and other io will not be able to handle it. Is this correct?

Feb.17,2022

"Why horizontal triggers can handle blocking Icano" doesn't quite understand. When we say whether the Iripple O is blocked or not, it mainly means whether we should wait when it is not ready. Now that epoll is used, it means that when you write it, it is ready and there is no blocking, so when you are done with this file descriptor, you can move on to the next prepared file descriptor.

Menu