Skip to content

Commit

Permalink
Change concurrency type to mainQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
arielitovsky committed Jul 27, 2012
1 parent 5c79ea0 commit 7f66185
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -106,7 +106,8 @@ + (void) MR_resetDefaultContext

+ (NSManagedObjectContext *) MR_contextWithoutParent;
{
NSManagedObjectContext *context = [[self alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType];
//Arie modification - changed concurrency type from main quere to prevent crashes with undo manager
NSManagedObjectContext *context = [[self alloc] initWithConcurrencyType:NSMainQueueConcurrencyType];
return context;
}

Expand Down Expand Up @@ -144,6 +145,7 @@ + (NSManagedObjectContext *) MR_contextWithStoreCoordinator:(NSPersistentStoreCo
if (coordinator != nil)
{
context = [self MR_contextWithoutParent];

[context performBlockAndWait:^{
[context setPersistentStoreCoordinator:coordinator];
}];
Expand Down

1 comment on commit 7f66185

@arielitovsky
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment should read "changed concurrency type TO main queue

Please sign in to comment.