title: Dispatch group - cannot notify to main thread
body: <p>After reading Swift 3 evolution on GCD, I am trying to create dispatch group. The problem is the <code>group.notify(queue:</code> do not notify when I pass <code>DispatchQueue.main</code> as a queue, although it does work for background queue.</p>
  
  <p>Also I am not sure my syntax is all correct, as I am trying to convert code from Swift 2 to Swift 3.</p>
  
  <pre><code>typealias CallBack = (result: Bool) -&gt; Void
  func longCalculations (completion: CallBack) {
  
  let backgroundQ = DispatchQueue.global(attributes: .qosBackground)
  
      let group = DispatchGroup()  
      var fill:[Int] = [] 
      for item in 0...200 {
          group.enter() 
          if item &gt; 50 {
              fill.append(item)
          }
          group.leave() 
      }
  
  //Below in the notify argument If I pass `backgroundQ`, it seems to work correctly but not when DispatchQueue.main is passed.
  </code></pre>
  
  <p><strong>This code do not work</strong></p>
  
  <pre><code>group.notify(queue: DispatchQueue.main, execute: {
      completion(result: true)
      })
   }
  </code></pre>
  
  <p><strong>This works correctly</strong></p>
  
  <pre><code>group.notify(queue: backgroundQ, execute: {
      completion(result: true)
      })
   }
  _______________________________________________________
  
  longCalculations() { print($0) }
  </code></pre>