Sleep when queue is empty.