Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to "Core Data" a Section on "Type Safety && Concurrency" #2

Open
StephenClarkApps opened this issue Jan 23, 2018 · 0 comments
Open

Comments

@StephenClarkApps
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant