title: Behavior differences between performBlock: and performBlockAndWait:?
body: <p>I'm creating an <code>NSManagedObjectContext</code> in a private queue to handle data updates I take from files and/or services:</p>
  
  <pre><code>NSManagedObjectContext *privateContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
  AppDelegate *appDelegate = [[UIApplication sharedApplication] delegate];
  privateContext.persistentStoreCoordinator = appDelegate.persistentStoreCoordinator;
  </code></pre>
  
  <p>Since I'm using a private queue, I don't fully understand the difference between <code>performBlock:</code> and <code>performBlockAndWait:</code> methods... To perform my data updates I'm currently doing this:</p>
  
  <pre><code>[privateContext performBlock: ^{
  
          // Parse files and/or call services and parse
          // their responses
  
          // Save context
          [privateContext save:nil];
  
          dispatch_async(dispatch_get_main_queue(), ^{
              // Notify update to user
          });
      }];
  </code></pre>
  
  <p>In this case, my data updates are made synchronoulsy and sequentially, so I suppose that is the correct place to save the context, right? If I'm doing something wrong, I'd appreciate if you let me know. On the other hand, would this code be equivalent?:</p>
  
  <pre><code>[privateContext performBlockAndWait: ^{
  
          // Parse files and/or call services and parse
          // their responses
  
          // Save context
          [privateContext save:nil];
      }];
  
  // Notify update to user
  </code></pre>
  
  <p>Again I guess that is the correct place to save the context... what are the differences between both methods (if any, in this case)?</p>
  
  <p>What if instead of performing synchronous service calls or files parsing, I need to perform asynchronous service calls? How would these data updates be managed?</p>
  
  <p>Thanks in advance</p>