Skip to content

Instantly share code, notes, and snippets.

@elango
Forked from jakemoore/gist:1574101
Created March 15, 2012 06:51
Show Gist options
  • Save elango/2042582 to your computer and use it in GitHub Desktop.
Save elango/2042582 to your computer and use it in GitHub Desktop.
GCD
dispatch_async( dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
// Code to run asynchronously
dispatch_async( dispatch_get_main_queue(), ^{
// Code to run on main thread
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment