Linux EPoll

Epoll 边缘触发和水平触发的区别

  • orthogonal :is the property that means "Changing A does not change B". An example of an orthogonal system would be a radio, where changing the station does not change the volume and vice-versa. In programming languages this means that when you execute an instruction, nothing but that instruction happens (very important for debugging).

1 Epoll 边缘触发

就绪改变时通知(或边缘触发就绪通知)的意思就是当你给内核一个文件描述符,一段时间后,如果该描述符从没有就绪到已经就绪,那么内核就会发出通知。它假定你知道文件描述符已经就绪,不会再为该描述符发出更多的就绪通知,直到你在描述符上进行一些操作使得该描述符不再就绪(如直到在 send , recv 或者 accept 等调用上遇到 EWOULDBLOCK 错误,或者发送/接收了少于请求字节数的数据)。

References

  1. epoll 边缘触发和水平触发的区别
  2. Java Tip: Orthogonality by example
  3. orthogonal

results matching ""

    No results matching ""