Created
December 16, 2010 14:43
-
-
Save yene/743465 to your computer and use it in GitHub Desktop.
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_queue_t queue = dispatch_queue_create(“com.app.task”,NULL) | |
dispatch_queue_t main = dispatch_get_main_queue(); | |
dispatch_async(queue,^{ | |
CGFLoat num = [self doSomeMassiveComputation]; | |
dispatch_async(main,^{ | |
[self updateUIWithNumber:num]; | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment