2

Can an NSManagedObjectId instance itself be safely shared between threads? I know I could drop a level down and grab its URIRepresentation, but if I can avoid that I will.

Thanks!

QED
  • 9,803
  • 7
  • 50
  • 87

1 Answers1

1

Yes, it is. NSManagedObjectID is the recommended way to pass an NSManagedObject from one thread to another. The idea is that you pass the NSManagedObjectID across threads, like you're suggesting. This CocoaCast helped clarify that (and other common Core Data stuff) for me.

QED
  • 9,803
  • 7
  • 50
  • 87
Michael Hulet
  • 3,253
  • 1
  • 16
  • 33