You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/loops/endless_loops.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Endless Loops
2
2
3
-
If a while loop will never end, we call that an endless loop.
3
+
If a while loop will never end, we call that an endless loop[^hot].
4
4
5
5
This can happen if the condition is a constant like `while (true)`
6
6
@@ -26,3 +26,5 @@ while (x != 1) {
26
26
27
27
Many games should never really "finish" so at the very start of that sort of program it is not uncommon
28
28
to see a `while (true)`.
29
+
30
+
[^hot]: If you run an endless loop that does nothing but loop your computer might start overheating. This is a natural part of the process and ultimately healthy for your CPU fans.
0 commit comments