Are all infinite loops bad?
问题 Out of curiousity, are all infinite loops bad? What are the bad effects and consequences that will happen if you run an infinite loop? Also, if they are not all bad, could you please give some examples when they will serve a meaningful purpose? And do they need to have something to close the instance? For example, we always close the StreamReader after using it in Java (not sure why). 回答1: I'm not sure what you mean by "bad". Infinite loops are common in many scenarios mostly event handler