Is Core Data Thread Safe
Is Core Data thread safe? Yes and no. Even though the framework originated in a time where computers with multicore processors were rare, Core Data is designed to operate in a multithreaded environment. In other words, it works fine on the latest iPhone and a Mac Pro with 28 cores.
But you need to know the rules Core Data plays by. A managed object context is always bound to a dispatch queue, a queue for short. The same applies to managed objects. You should never pass a managed object from one queue to another. If you need to access a managed object from another queue, then pass the ID of the managed object, an instance of the
NSManagedObjectID class. A
NSManagedObjectID instance uniquely identifies a record in the persistent store. Working In a Multithreaded Environment covers Core Data and threading in more detail.