I just read on this answer(answer has since been removed) and I'm sure I've seen apps crash after hanging so what I read made sense.
If you block the main thread for too long the OS will kill your app.
However I wrote a few tests and found that none of them caused the app to crash after waiting approx 2-5 mins on each. Breakpoints confirmed that I'm running on the main thread.
Can someone confirm or disprove what I read please or have I just picked a lot of options which are non-blocking?
If I have picked non blocking options, can somebody explain why these are non-blocking?
while (true) { /*Nothing*/ }
while (true) { NSLog(@"nothing"); }
for(;;);
sleep(100000000);
while(true) { sleep(1); }