I have an OSX app where I'm using a parent/child NSManagedObjectContext setup. The child MOC has NSPrivateQueueConcurrencyType and is the one that I'm primarily using. The parent is set to be NSMainQueueConcurrencyType
When I call performBlockAndWait on the child context from a background thread at the same time as it is called from the main thread I get deadlock – semaphore_wait_trap. Pausing the debugger shows both threads are stuck at performBlockAndWait
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?