AppKit is not thread safe. Any updates to the user interface object must be performed in the main thread. KVO does not send monitoring messages on streams. Thus, you will need another way to update the progress indicator than just KVO.
In your NSOperation main method, you need to send progress messages periodically. The easiest way would be to use NSNotificationCenter with a custom notification so that the main thread can listen for updates. (Note that notifications are always sent to the stream from which they were sent, so you need to use the performSelectorOnMainThread: method to make sure that notifications are delivered in the user interface stream.)
In your main thread, you need to add your class as an observer to receive these notifications and update the progress indicator. If you want to use the bindings for the progress indicator, you can bind it to the property of the controller object, which you update when you receive progress notifications using NSOperation .
source share