You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A question I have been asked in interview is about whether Core Data typesafe, and how to manage concurrency with Core Data... A simple answer being that Core Data is not typesafe, whilst one may use different queues, with Core Data "Core Data expects to be run on a single thread." (https://cocoacasts.com/core-data-and-concurrency/). You could put different NSManageObjectContext(s) into your app, but you can't share managed object contexts between threads. With the answer you might also want to cover the: three concurrency types , mainQueueConcurrencyType, confinementConcurrencyType, privateQueueConcurrencyType for an NSManagedObjectContext.
The text was updated successfully, but these errors were encountered:
A question I have been asked in interview is about whether Core Data typesafe, and how to manage concurrency with Core Data... A simple answer being that Core Data is not typesafe, whilst one may use different queues, with Core Data "Core Data expects to be run on a single thread." (https://cocoacasts.com/core-data-and-concurrency/). You could put different NSManageObjectContext(s) into your app, but you can't share managed object contexts between threads. With the answer you might also want to cover the: three concurrency types , mainQueueConcurrencyType, confinementConcurrencyType, privateQueueConcurrencyType for an NSManagedObjectContext.
The text was updated successfully, but these errors were encountered: