Using the Linux EPOLLONESHOT flag lets the kernel remove a socket from the epoll interest set once it becomes ready, effectively doing the bouncing-select bookkeeping for free. None of the existing Ruby epoll wrappers supported EPOLLONESHOT properly, so a custom C extension was necessary.