2 ms·
I never mentioned performance, I'm suggesting that kqueue is a better 'interface'. epoll is an interface designed by someone who didn't know what they were doi
by dijit 6y ago
I never mentioned performance, I'm suggesting that kqueue is a better 'interface'.
epoll is an interface designed by someone who didn't know what they were doing at the time, that's the only way it can be described.. if you look at alternative implementations (such as IO-Completion ports on Windows) then you can see there's a lot to be desired, one of the things epoll doesn't do, for instance is tell you how many bytes are waiting on a buffer; so you have to read the whole buffer and determine if you're beginning a new unrelated message or not.
There's also the fact that epoll will evict things from the buffer on read; so you can't do a partial read and come back. It's just.. bad. io_uring solves a lot of these issues.