Use select.epoll on linux systems and select.kqueue on mac