title: Accessing the objectID of a NSManagedObject on a different thread?
body: <p>Part of my UITableViewCell's content creation is delayed by the fault that happens on one object's (CoreData NSManagedObject) initial access.  This manifests itself in a small hiccup the cell is first scrolled into view.  I decided to push that access of those objects off to a background thread.  </p>
  
  <p>This is how I implemented it and it works well, but we all know that we are not supposed to access one thread(the main thread)'s NSManagedObjectContext in another thread, but can we get the objectID of an object in a second thread if it was originally fetched in the first thread?</p>
  
  <p>Getting the objectID takes a small amount of time, which I was hoping to push into the background with everything else.</p>
  
  <pre><code>MyRecord *record = [self.frc objectAtIndexPath: indexPath];
  
  // Should the following be here or can it be below in the background thread?
  // NSManagedObjectID *recordObjectID = record.objectID;
  
  dispatch_async(_recordViewQueue, ^(void) {
      if ([cell.origIndexPath isEqual:indexPath]) {
  
          // should the following be here or above?  It works here, but am I just lucky?
          // this call seems to take about 2/100 of a second
          NSManagedObjectID *recordObjectID = record.objectID;
  
          NSManagedObjectContext *bgndContext = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSConfinementConcurrencyType];
          bgndContext.persistentStoreCoordinator = App.sharedApp.storeCoordinator;
          MyRecord *newRecord = (MyRecord *) [bgndContext objectWithID:recordObjectID];
  
          [self updateCell:cell withRecord:newRecord];
  
          if ([cell.origIndexPath isEqual:indexPath]) {
              dispatch_async(dispatch_get_main_queue(), ^{
                  [(UIView*) cell.recordView setNeedsDisplay];
              });
          }
      }
  });
  </code></pre>
  
  <p>Is this safe?  Or do I have to get the objectID in the mainThread?</p>