Created
March 12, 2012 08:47
-
-
Save pkyeck/2020764 to your computer and use it in GitHub Desktop.
ios background thread
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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