Suppose the following series of events occurs:
This is only a partial answer, but Jason Baron (the author of the EPOLLEXCLUSIVE
patch) just responded to an email I sent him to confirm that when using EPOLLEXCLUSIVE
in level-triggered mode he does think it's possible that two connections will arrive but only one thread will be woken (thread B keeps sleeping). So when using EPOLLEXCLUSIVE
you have to use the same kinds of defensive programming as you use for edge-trigged epoll, regardless of whether you set EPOLLET
.