Skip to content

Instantly share code, notes, and snippets.

@pkyeck
Created March 12, 2012 08:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkyeck/2020764 to your computer and use it in GitHub Desktop.
Save pkyeck/2020764 to your computer and use it in GitHub Desktop.
ios background thread
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^{
/* do your copying here */
dispatch_async(dispatch_get_main_queue(), ^{
/* anything in here will happen on the main thread after the background thread has finished copying. For example, update your UI. */
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment