title: Updating UI from background thread SWIFT
body: <p>I'm using this code for background work: </p>
  
  <pre><code>let queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
      dispatch_async(queue, {
          // Some work in the background and updating UI too.
      });
  </code></pre>
  
  <p>However I was reading <a href="http://thatthinginswift.com/background-threads/" rel="nofollow">here</a> that we should use:</p>
  
  <pre><code>let priority = DISPATCH_QUEUE_PRIORITY_DEFAULT
  dispatch_async(dispatch_get_global_queue(priority, 0)) {
  // do some task
  dispatch_async(dispatch_get_main_queue()) {
      // update some UI
  }
  }
  </code></pre>
  
  <p>when updating UI. 
  My question is: In the code sample I am using the UI gets updated in the global queue and UI is updated without errors. What is the difference between the approach I am using, and the approach mentioned in the link above?</p>
  
  <p>P.S: the code is executed on Mac OS X 10.10</p>