Is it possible to cancel a thread while performSelector waitsUntilDone?
See below:
I have a while loop with following line:
[self performSelector:@selector(getMyRecords:) onThread:myThread withObject:i waitUntilDone:YES]
Sometimes, I need to cancel my thread myThread
while my loop executes. I get following crash issue:
Terminating app due to uncaught exception 'NSDestinationInvalidException', reason: '*** -[MyController performSelector:onThread:withObject:waitUntilDone:modes:]: target thread exited while waiting for the perform'