title: UI does not update when main thread is blocked in Cocoa app
body: <p>I am using a NSProgressIndicator in my main thread to update on progress as I run through my entire method. Now when I end up calling an object from a different class file, and wait for that object to return to a value to my main thread, I notice that the NSProgressIndicator will disappear. I understand that this is because the main thread is blocked until I get the return value from the other object.</p>
  
  <p>So my questions is what is the recommended way for updating UI in the main thread without blocking it and having other objects run in the background and return values to the main thread as needed. I know how to use blocks but blockoperations are not allowed to return values.
  What I need is something that helps this pseudo code:</p>
  
  <pre><code>-(IBAction) main {
  
  //Update progress indicator UI to show progress
  //perform an call to another object from another class.
  // wait till i get its return value.
  //Update progress indicator UI to show progress
  // Use this return value to do something.
  //Update progress indicator UI to show progress
  
  
  }
  </code></pre>
  
  <p>When the call to the other object is made, I notice that the determinate NSProgressIndicator I have completely disappears since the main thread is blocked. Thanks.</p>