title: CoreData and dispatch_async using Object from main managedObjectContext
body: <p>I need to change some entities from the background thread, so I do the following:</p>
  
  <pre><code>dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
  
      NSManagedObjectContext *parent = [Default managedObjectContext];
      NSManagedObjectContext *editContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:parent.concurrencyType];
      [editContext setPersistentStoreCoordinator:[Default persistentStoreCoordinator]];
  
      [[NSNotificationCenter defaultCenter] addObserver:self
                                               selector:@selector(saveChanges:)
                                                   name:NSManagedObjectContextDidSaveNotification
                                                 object:editContext];
  
      NSFetchRequest *request = [NSFetchRequest new];
      ...
      NSArray *fetchedObjects = [context executeFetchRequest:request error:nil];
  
      NSError *error;
      [editContext save:&amp;error]
  });
  </code></pre>
  
  <p>It is working, but sometimes it stops working, just exits from function on executeFetchRequest:request. It is happened on simulator.
  So Is it correct method for changing data from background thread?</p>