title: NSManagedObjectContext performBlockAndWait causing deadlock when called from two threads
body: <p>I have an OSX app where I'm using a parent/child NSManagedObjectContext setup. The child MOC has <code>NSPrivateQueueConcurrencyType</code> and is the one that I'm primarily using. The parent is set to be <code>NSMainQueueConcurrencyType</code></p>
  
  <p>When I call <code>performBlockAndWait</code> on the child context from a background thread at the same time as it is called from the main thread I get deadlock – <code>semaphore_wait_trap</code>. Pausing the debugger shows both threads are stuck at <code>performBlockAndWait</code></p>
  
  <p>How can I get around this? I thought this method was designed for exactly this situation and would simply queue up the blocks on the context's private queue then return appropriately?</p>