O'Reilly logo

Core Data in Swift by Marcus S. Zarra

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Wrapping Up

Threading is an extremely difficult subject. Very few developers get it right, and even those few still manage to make mistakes in this area. Threading is arguably one of the hardest concepts in computer science.

Threading with Core Data used to be extremely difficult to get right. Now with having only main queue and private queue contexts, it has gotten a lot simpler and it boils down to a simple Boolean decision. If you’re working with the UI, then you should be using a main queue context. If you aren’t, then you should be using a private queue context.

However, even with this threading model, there are still times when a lot of work needs to be done on the data in a short period of time. For those rare situations, the Core Data ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required