Skip to content

Instantly share code, notes, and snippets.

@lfarah
Created April 4, 2015 22:19
Show Gist options
  • Save lfarah/af03c44bde7a1d670304 to your computer and use it in GitHub Desktop.
Save lfarah/af03c44bde7a1d670304 to your computer and use it in GitHub Desktop.
let priority = DISPATCH_QUEUE_PRIORITY_DEFAULT
dispatch_async(dispatch_get_global_queue(priority, 0)) {
// do some task
dispatch_async(dispatch_get_main_queue()) {
// update some UI
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment