epoll thread code improved