title: How to handle group wait result in Swift 3
body: <p>I was trying following code in playground, but it seems that they are not working as I expected. </p>
  
  <p>Two group_async operations cause about 5~6 seconds in total on my mac. </p>
  
  <ul>
  <li>When I set the timeout time to DispatchTime.now() + 10, "test returns" and "done" are both printed. </li>
  <li>When I set the timeout time to DispatchTime.now() + 1 (some value make the group timed out), nothing is printed except the printing codes in two group_async operations. </li>
  </ul>
  
  <p>What I want is to suspend the group and do some clean-up when timed out, and do some other further operations when group successfully finished. Any advice is appreciated. Thanks.</p>
  
  <pre><code>import Dispatch
  import PlaygroundSupport
  
  PlaygroundPage.current.needsIndefiniteExecution = true
  let queue = DispatchQueue.global(qos: .utility)
  
  func test() {
      let group = DispatchGroup()
      __dispatch_group_async(group, queue) {
          var a = [String]()
          for i in 1...999 {
              a.append(String(i))
              print("appending array a...")
          }
          print("a finished")
      }
  
      __dispatch_group_async(group, queue) {
          var b = [String]()
          for i in 1...999 {
              b.append(String(i))
              print("appending array b...")
          }
          print("b finished")
      }
  
      let result = group.wait(timeout: DispatchTime.now() + 10)
      if result == .timedOut {
          group.suspend()
          print("timed out")
      }
      print("test returns")
  }
  
  
  queue.async {
      test()
      print("done")
  }
  </code></pre>