Name: Anonymous 2013-09-29 11:08
Is it better to use
I've always used
Is
What do you all use?
poll(2)
or select(2)
?I've always used
select(2)
in my daemons, but I'm finding poll(2)
designs to be far cleaner, since I don't have to do all the FD_SET
nonsense on every call and it keeps the descriptor, requested events and activated events all in the same structure that is fed directly to the call.Is
poll(2)
more performant? I know there's kqueue, epoll, and all that other shit, but I'm not going to use something platform specific. Seems like poll(2)
works on BSD and Linux in the same way, though I've not done any proper testing.What do you all use?