fix pthread lock schedule dead loop
adjust epoll dispatch