Skip to content

Instantly share code, notes, and snippets.

@pkyeck
Created March 12, 2012 08:47
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