title: Why should I prefer to create an NSManagedObjectContext for every new thread or NSOperation instead of calling Core Data on the Main thread?
body: <p>Some developers already told me that I can create a new NSManagedObjectContext instance for every new thread, to make Core Data thread-safe. Then I would just have to take care of the merging afterwards.</p>
  
  <p>For me, this sounds like A LOT of extra code and overhead.</p>
  
  <p>Is there a reason why this solution would be bad? Here it comes:</p>
  
  <p>Instead of creating a new MOC for every new thread or for every NSOperation, I would perform MOC-changes on the Main Thread, just like we know from UIKit. I would just call <code>-performSelectorOnMainThread:...waitUntilDone:YES</code> and get rid of all Core Data concurrency issues.</p>
  
  <p>Pros: 
  - Don't have to create a new MOC for every Thread / NSOperation.
  - Don't have to merge MOCs together.
  - For sure no concurrency issue since Core Data stays on the Main thread where it is safe.</p>
  
  <p>Cons:
  - Calls like <code>-performSelectorOnMainThread:...waitUntilDone:YES</code> look ugly, hard to read.
  - Thread / NSOperation gets blocked. But in reality, the system can't do multiple things at once anyways.  In my case, the Core Data part is not the performance bottleneck. It's the heavy calculations around it that go in a background thread or NSOperation.</p>
  
  <p>What do you think? Is this worth exploring further? Why would you still prefer to create a MOC for every new Thread / NSOperation and then deal with merging? What's the advantage of this compared to doing it on the Main thread?</p>