A deadlock can occur if a save occurs during a merge. The save monitor is using synchronous peforms on the event queue. The merge calls save on the merge queue, and this somehow triggers activity on the main thread, but that is blocked by the save perform.
Replaced performBlockAndWait: in save monitor with performBlock:.
You now need to be careful to use processPendingChanges... or a merge when terminating, to ensure the event store is fully saved.
A deadlock can occur if a save occurs during a merge. The save monitor is using synchronous peforms on the event queue. The merge calls save on the merge queue, and this somehow triggers activity on the main thread, but that is blocked by the save perform.
Solution is make all save ops non-blocking.