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!
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!
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.