Ensure that while is not blocking