GCD, NSThread, and performSelector:onThread: issues
I'm attempting to debug some iOS crash logs that contain the following error message: *** Terminating app due to uncaught exception 'NSDestinationInvalidException', reason: '*** -[SomeClass performSelector:onThread:withObject:waitUntilDone:modes:]: target thread exited while waiting for the perform The relevant section of the code is: - (void) runInvocationOnMyThread:(NSInvocation*)invocation { NSThread* currentThread = [NSThread currentThread]; if (currentThread != myThread) { //call over to the correct thread [self performSelector:@selector(runInvocationOnMyThread:) onThread:myThread