Top "Infinite-loop" questions

An "infinite loop" is a loop in which the exit criteria are never satisfied; such a loop would perform a potentially infinite number of iterations of the loop body.

Read all lines with BufferedReader

I want to type a multiple line text into the console using a BufferedReader and when I hit "Enter" to …

java bufferedreader infinite-loop inputstreamreader
How can I terminate an infinite loop in Turbo C?

I get stuck in an infinite loop. How can I terminate this loop? I tried to use/press Cntrlc but …

c infinite-loop turbo-c
Control Break out of Infinite Loop In 2010 (2013) Excel VBA

If I write code creating an infinite loop, with my new Excel, the Ctrl + Break no longer works. Neither does …

excel vba infinite-loop break ctrl
Is there an expression for an infinite generator?

Is there a straight-forward generator expression that can yield infinite elements? This is a purely theoretical question. No need for …

python iterator generator infinite-loop
How can I change the EditText text without triggering the Text Watcher?

I have an EditText field with a Customer Text Watcher on it. In a piece of code I need to …

java android event-handling infinite-loop
CPU friendly infinite loop

Writing an infinite loop is simple: while(true){ //add whatever break condition here } But this will trash the CPU performance. …

c# .net console-application infinite-loop
Is "for(;;)" faster than "while (TRUE)"? If not, why do people use it?

for (;;) { //Something to be done repeatedly } I have seen this sort of thing used a lot, but I think it …

c++ c optimization readability infinite-loop
Infinite for loops possible in Python?

Is it possible to get an infinite loop in for loop? My guess is that there can be an infinite …

python loops for-loop infinite-loop infinite
python exit infinite while loop with KeyboardInterrupt exception

My while loop does not exit when Ctrl+C is pressed. It seemingly ignores my KeyboardInterrupt exception. The loop portion …

python infinite-loop keyboardinterrupt try-except systemexit
How to stop an infinite loop safely in Python?

I've got a script that runs on a infinite loop and adds things to a database and does things that …

python infinite-loop