sleep when queue is empty