Closed lyahdav closed 10 years ago
It seems that the method sets up a managed object context with PrivateQueueConcurrencyType. However, the code seems to be running on main thread as it does not use performBlock. This could be a possible fix:
NSManagedObjectContext *managedObjectContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; [managedObjectContext setPersistentStoreCoordinator:[self.managedObjectContext persistentStoreCoordinator]]; [managedObjectContext setUndoManager:nil]; [managedObjectContext performBlockAndWait:^{ __block NSMutableArray *updates = [[NSMutableArray alloc] init]; ...
This has been fixed in 969082df70ddd34f999bd5121bd72d0f818b4b4f.
It seems that the method sets up a managed object context with PrivateQueueConcurrencyType. However, the code seems to be running on main thread as it does not use performBlock. This could be a possible fix: