Allow early termination of iteration