title: how to swift async block passed
body: <pre><code>func datakontrol(){
  
  let url = NSURL(string: "http://localhost.192.168.1.40.xip.io:8888/store1.php")
  URLSession.shared.dataTask(with: (url as URL?)!, completionHandler: {(data, response, error) -&gt; Void in
  
      if let jsonObj = try? JSONSerialization.jsonObject(with: data!, options: .allowFragments) as? NSDictionary {
  
          guard let telefon = jsonObj!["telefon"] as? String else { return }
          GlobalVariables.telefonum = telefon
      }
  }).resume()
  </code></pre>
  
  <p>When I try trace this code jump from dataTask to end of code.I think ask a wrong question. I want this code is completed. Sorry for my English.</p>