I want to stop in 10 minutes automatically any infinite loop problem.
Infinite Loop
Page 1 of 18 Replies - 1252 Views - Last Post: 17 August 2010 - 03:47 PM
Replies To: Infinite Loop
#2
Re: Infinite Loop
Posted 17 August 2010 - 02:53 PM
1. Set up a timer.
2. break; after ten minutes have elapsed.
2. break; after ten minutes have elapsed.
#3
Re: Infinite Loop
Posted 17 August 2010 - 02:55 PM
You can use a Timer object that breaks after 10 minutes.
#6
Re: Infinite Loop
Posted 17 August 2010 - 03:42 PM
This would be an horrible patch
Better to investigate why your program is going into an infinite loop
You can write code with try/catch statements for every 5 lines of code. Not a very good practice at all.
Better to investigate why your program is going into an infinite loop
You can write code with try/catch statements for every 5 lines of code. Not a very good practice at all.
#7
Re: Infinite Loop
Posted 17 August 2010 - 03:44 PM
As a general practice, better to write code that won't blow up than to patch together a bunch of safeguards in case of every blowup. You'll have less code that is more efficient this way.
#8
Re: Infinite Loop
Posted 17 August 2010 - 03:47 PM
I've got a feeling if code was provided, it could be solved easier and more helpful.
#9
Re: Infinite Loop
Posted 17 August 2010 - 03:47 PM
and it means there if at least one error in your logic. Hope you are not writing a cardiac monitoring system
Page 1 of 1

New Topic/Question
Reply



MultiQuote









|