copy from https://github.com/kulv2012/libtask.git, try to change to epoll version