I am trying to understand the concept behind the for loop example
for (;;)
{
//write code
}
I understand what it does and how it\'s the sa
while(abortRequested)
{
// ....
}
is almost equivalent to
while(true)
{
// ...
// ... dozens of lines of code ...
if(abortRequested)
break;
// prepare next iteration
}
Alternatively this might also run in a daemon thread which automatically gets terminated when all non-daemon threads are done. So the semantic of these constructs generally is:
Should keep running forever by default, unless some explicit termination event is received.