Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dispatch_async(dispatch_get_main_queue(), ^{
- NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
- childContext.parentContext = self.managedObjectContext;
- [childContext performBlock:^{
- // do something with childContext and save
- }];
- });
- dispatch_async(dispatch_get_main_queue(), ^{
- NSManagedObjectContext *childContext = [[[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType] autorelease];
- childContext.parentContext = self.managedObjectContext;
- [childContext performBlock:^{
- [RequestOperationManager POST... parameters... success...{
- // Can I re-use childContext here?
- }];
- }];
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement