Implement queuepoll.