iPhone – Grand Central Dispatch main thread
Dispatching a block to the main queue is usually done from a background queue to signal that some background processing has finished e.g. – (void)doCalculation { //you can use any string instead “com.mycompany.myqueue” dispatch_queue_t backgroundQueue = dispatch_queue_create(“com.mycompany.myqueue”, 0); dispatch_async(backgroundQueue, ^{ int result = <some really long calculation that takes seconds to complete>; dispatch_async(dispatch_get_main_queue(), ^{ [self … Read more