title: When app returns to foreground async main_queue calls not performed until after expiration handler
body: <p>I've a task that renders e.g. 50 objects and saves each one as a file. It's set up to continue running in the background and notify the user when the task is completed. While in the foreground, there's a progress bar, that shows the user how far along everything is.</p>
  
  <p>The rendering &amp; writing of files are all done on custom background threads, using GCD. In order to update the progress bar, dispatch_async on the main_queue is called.</p>
  
  <hr>
  
  <h2>Here's my problem...</h2>
  
  <p>When the user enters the background, the task continues as planned and, if let alone and still in the background, notifies the user when it's complete. But if the user returns sooner, and the app is still rendering/writing, I/the user would expect to see the progress and all >>> That does not happen. Even though my method to update the progress bar is sent off via dispatch_async on main_queue, the task isn't executed (or the main_queue received if you will), until the 'renter/writing' task I sent in the background is completed and the ExpirationHandler performed.</p>
  
  <p>In the 'applicationWillEnterForeground:' method I tell the app, that it should 'endBackgroundTask:' and set the instance (=self.backgroundTask) to 'UIBackgroundTaskInvalid', but that doesn't make a difference</p>
  
  <h2>My question...</h2>
  
  <p>Is there a way for me to get back control of a task (running on a GCD-custom background thread) that I sent into the background (beginBackgroundTaskWithExpirationHandler:) when the app closed?</p>
  
  <p>AND/OR</p>
  
  <p>Do I not specifically have to get back control, but do/set something differently?</p>