Skip to content

Instantly share code, notes, and snippets.

@tudormunteanu
Last active September 30, 2015 14:07
Show Gist options
  • Save tudormunteanu/1803383 to your computer and use it in GitHub Desktop.
Save tudormunteanu/1803383 to your computer and use it in GitHub Desktop.
GCD multi-threading async dispatch
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
// stuff to do in the background
dispatch_async(dispatch_get_main_queue(), ^{
// stuff to do on the main thread
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment