how should you cancel an NSInvocationOperation so that your code stops?
I have a background thread that goes off to a server and gets XML which then renders it to a graph.
I have an NSTimer
which fires off a request every 5 seconds, what is typically the best way to s开发者_如何学Ctop the execution of a thread altogether (if at all possible), I know you can subclass NSInvocationOperation and implement the cancel method, but I dont know what exactly to do, other that put if (hasBeenCancelled) return;
statements everywhere throughout the code...
精彩评论