Closed pronebird closed 8 years ago
If you set up a main queue context, change objects in it and save it, you get the app deadlocked.
NSManagedObjectContext *rootContext = [NSManagedObjectContext MR_rootSavingContext]; self.context = [NSManagedObjectContext MR_newMainQueueContext]; [self.context setParentContext:rootContext]; [self.context MR_observeContextOnMainThread:rootContext];
MR_observeContextOnMainThread
dispatch_async
performSelectorOnMainThread
waitUntilDone = YES
This is bullshit
Thanks!
If you set up a main queue context, change objects in it and save it, you get the app deadlocked.
MR_observeContextOnMainThread
implementation at all.dispatch_async
to merge changes to default context, whileMR_observeContextOnMainThread
usesperformSelectorOnMainThread
withwaitUntilDone = YES
.