I'm performing a few NSInvocationOperation
s by adding them to a NSOperationQueue
. While making changes to UI, I call the dispatch_async(dispatch_get_main_queue() )
instead of [NSOperationQueue mainQueue] addOperationWithBlock:^(void){}]
. Does this sound logically right? I'm still trying to execute the block on the main thread.
Right. dispatch_async(dispatch_get_main_queue(), block)
is thread-safe, just putting the block to the main queue, so you can call it from NSOperationQueue or any thread.