That would be great. If unity could detect that the editor stops responding for more than a minute it should pop up asking if you’d like to pause/stop the play window.
It’s better than it crashes and makes you know there’s a problem instead of just silently failing to do what you want. It’s a lot easier to track down that way.
There are very few exceptions that unity will fall into a infinite feedback loop or overflow the stack, and you’ve clearly discovered the most obvious one. If your writing an enumerable function that does not return, you don’t understand how an enumerable function works.