title: How to call CLGeocoder method synchronously
body: <p>I have in ViewController code</p>
  
  <pre><code>var location = CLLocation()
      DispatchQueue.global().sync {
          let objLocationManager = clsLocationManager()
          location = objLocationManager.findLocationByAddress(address: self.txtTo.stringValue)
      }
      lblToLatitude.stringValue = String(location.coordinate.latitude)
      lblToLongitude.stringValue = String(location.coordinate.longitude)
  </code></pre>
  
  <p>calling findLocationByAddress method which is implemented in separate class clsLocationManager like this</p>
  
  <pre><code>func findLocationByAddress(address: String) -&gt; CLLocation {
      let geoCoder = CLGeocoder()
      var location = CLLocation()
      geoCoder.geocodeAddressString(address, completionHandler: {(places, error) in
          guard error == nil else { return }
          location = places![0].location!
      })
      return location
  }
  </code></pre>
  
  <p>I try to ensure via DispatchQueue.global().sync that geo-coding is executed before passing coordinates to lblToLatitude and lblToLongitude labels but it doesn't work. Of course I could do geo-coding in ViewController code but I'm wondering how to keep it in separate class.</p>