I have an NSOperation. When it is finished I fire a NSNotificationCenter to let the program know that the NSoperation is finished and to update the gui.
To my under
If you're on 10.6, you can also use setCompletionBlock:. It's used like this:
NSOperation*op= .... ;
[op setCompletionBlock:^{
dispatch_async(dispatch_get_main_queue(),^{
code to be run on the main thread after the operation is finished.
});
}];
For general introduction on blocks and GCD, this article was extremely helpful. I found GCD & setCompletionBlock easier to read than NSNotification. One caveat is, well, it only runs on 10.6!