If I do this:
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
[self someMethod];
});
And someMethod is this:
-(void)someMethod{
//doing stuff with no mention of GCD
}
Will someMethod run inside the dispatch queue, or will that queue wait for someMethod to run on the main thread, since someMethod does not itself dispatch anything to other queues?
Methods are executed on the thread or queue from which they are invoked. So, if you wanted to update UI after processing data on a background queue, you’d need to explicitly execute your UI update on the main thread.
For example: