Skip to content

Instantly share code, notes, and snippets.

@Pablo-Merino
Created October 26, 2012 13:53
Show Gist options
  • Save Pablo-Merino/3958948 to your computer and use it in GitHub Desktop.
Save Pablo-Merino/3958948 to your computer and use it in GitHub Desktop.
gcd.m
dispatch_queue_t myQueue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
dispatch_async(myQueue, ^{
[self performSelectorOnMainThread:@selector(someActionToUpdate:) withObject:an_object waitUntilDone:YES];
});
-(void)someActionToUpdate:(id)an_object {
// an_object can be any kind of type
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment