Permalink
Browse files

explicit MOC locking

  • Loading branch information...
1 parent 9d7fd07 commit 532bc3da9a956b68bba9cf72bbcd39e84687c2c7 @drewcrawford committed Feb 27, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 CoreDataHelp/CDHRepo.m
View
@@ -120,8 +120,11 @@ -(void) performBlock:(operationBlock) b {
-(void) performBlockAndReturnOnMain:(operationBlock) b {
[self internalPerformBlock:^{
+
dispatch_sync(dispatch_get_main_queue(), ^{
+ [_moc lock];
b();
+ [_moc unlock];
});
}];
}

0 comments on commit 532bc3d

Please sign in to comment.