NSManagedObjectContext is still not thread safe even with private concurrency types.
execute Block: and execute BlockAndWait: only ensure the execution of block operations in the queue specified for the context.
You can still get deadlocks with executeBlockAndWait: because it will block the current executable thread until it returns. What happens inside performBlockAndWait :? Perhaps something that requires access to the main thread, so it has come to a standstill.
Can you use performBlock: instead?
source share