learned Pascal and C as an undergraduate CS major · Author has 1.7K answers and 7.2M answer views · 6y ·
You could put the infinite loop in a thread, test the thread, and then stop the thread by having the test set a variable that the thread periodically inspects and exits if the variable is set to True.
Or otherwise set things up so that loop is infinite in production, but finite when under test.
3.6K views ·
View upvotes
· 1 of 1 answer
Something went wrong. Wait a moment and try again.