Skip to content

Instantly share code, notes, and snippets.

@AlanQuatermain
Created October 10, 2009 03:56
Show Gist options
  • Save AlanQuatermain/206581 to your computer and use it in GitHub Desktop.
Save AlanQuatermain/206581 to your computer and use it in GitHub Desktop.
- (void) functionWhichAnnoyinglyBlocksExecution: (NSFileHandle *) annoyingFileHandle
{
dispatch_async(dispatch_get_global_queue(0,0), ^{
id result = [annoyingFileHandle someBlockingOp];
dispatch_async(dispatch_get_main_queue(), ^{
[myController displayResult: result];
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment