I want to stop the execution of the thread.I used "iscancelled" but there is something going wrong..After cancelling the thread it's execution does not stop.
NSLog(@"YES-------%d,%d", [myThread isExecuting], [myThread isCancelled]);//(OutPut--1,0)
[myThread cancel];
if([[NSThread currentThread] isCancelled])
{
[NSThread exit];
}
NSLog(@"YES-------%d,%d", [myThread isExecuting], [myThread isCancelled]);//(OutPut--1,1)
How is it possible that after canceling the thread it's execution does not stop????
Thanks,