Skip to content

Instantly share code, notes, and snippets.

@yene
Created December 16, 2010 14:43
Show Gist options
  • Save yene/743465 to your computer and use it in GitHub Desktop.
Save yene/743465 to your computer and use it in GitHub Desktop.
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