What is the order in which File Descriptors in epoll are returned?

后端 未结 2 948
花落未央
花落未央 2021-01-18 10:47

Let\'s say I have set a set of file descriptors, say 8, 9, 10, 11, 12 in the order specified and do an epoll_wait() for data to be read on them.

epoll_wait returns w

2条回答
  •  半阙折子戏
    2021-01-18 11:38

    Just think about it logically. Presumably they're not all marked as readable as a single atomic operation, and epoll_wait might then just as well just return 1 fd available each time it's called. It makes no sense to depend on the order of it's output.

提交回复
热议问题