Here, I will save basic coredata information for anyone/me would like a quick refresh for these fundamentals from time to time.
- Core Data is not a database, but instead it manages an Object Graph.
NSManagedObject
andNSManagedObjectContext
in Core Data are not thread-safe.- Core Data avoids data race issues by operating on
NSManagedObject
instances andNSManagedObjectContext
instances in a serial queue.
This is why we need to place the operation code within the closures of perform or performAndWait.