title: When an iOS application goes to the background, are lengthy tasks paused?
body: <p>Yes, I know if I wish my app to be responsive to users' multitasking actions, such as switch to another app, I should deal with </p>
  
  <pre><code>- (void)applicationWillResignActive:(UIApplication *)application
  - (void)applicationDidBecomeActive:(UIApplication *)application
  </code></pre>
  
  <p>What if my app is doing a quite-long time consuming operation (like downloading a big file) and the user causes my app to enter the background? Will that operation automatically be suspended and resumed when the user comes back to my app?</p>
  
  <p>What exactly will happen behind the scene when my app enters the background or resumes in the foreground?</p>
  
  <p>What if when users let my app go to the background my app's execution is just in the middle of a method?</p>
  
  <p>For e.g., my app is doing</p>
  
  <pre><code>for (int i = 1 to 10000K) {
      do some calculation;
  }
  </code></pre>
  
  <p>When i== 500K, user switches to another app. What happens to the for-loop in my app?</p>