Chapter 6Threading

Multithreading is one of the great double-edged swords of programming. If it’s done correctly, it can be a real boon to your application; done incorrectly, it leads to strange, unreproducible errors in the application. Multithreading has a tendency to polarize developers: they either swear that it’s necessary for any application to perform properly or declare it’s to be avoided at all costs. The truth, of course, is somewhere in the middle. Multithreading is a vital piece of the overall performance puzzle. While adding more threads won’t automatically make your application faster, it can make your application “feel” faster to the user. That perception is what we’ll focus on in this chapter.

It’s a common misconception among ...

Get Core Data in Swift now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.