 <p>To use a closure in this situation try something like </p> <pre><code>func getCityDetail (completion:()-&gt;()){ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0)) { //background thread, do ws related stuff, the ws should block until finished here dispatch_async(dispatch_get_main_queue()) { completion() //main thread, handle completion } } } </code></pre> <p>then you can use it like </p> <pre><code>objWebService.getCityDetail { //do something when the ws is complete } </code></pre>