Replaced event loop with external poll.