implement a simple epoll loop