Instead of
[self.navigationController pushViewController:vc animated:YES];
you can try this:
[self.navigationController performSelectorOnMainThread:@selector(someMethod) withObject:<#(id)#> waitUntilDone:NO];
-(void)someMethod
{
//pushViewController:animated: //and other stuffs
}
Also if you want to cancel the operation, it would be better if you use NSOperation instead of NSOperation instead of NSInvocationOperation. You can create a subclass of NSOperation and you can perform all the other stuff apart from the UI update there itself. It has a property "cancel". You can use it along with the NSMutableURLRequest if you want it to be cancelled for time out.
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:self.downloadURL cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:30.0];
I dont know exactly what are you trying to do in the second thread apart from the main thread but the only thing that you have to keep in mind is that you have to separate the main thread from the other threads. Whenever you are dealing with the UI or updating the UI, you have to do all that stuff in the main thread. The rest of the manipulations and background stuff can be handled by the separate thread by using NSOperationQueue. Otherwise, your UI might freeze.
Please let me know if it works. Thanks :) :)