single thread longPoll implemented