Well Managed Object Contexts (/dev/world/2011)
Channel: AUC_ANZ
Date: 2014-12-14

Presenter: Mark Aufflick
Prior to Mac OS X Lion, Core Data only had one concurrency model, what is now called “Thread Confinement”.  It was a lot of effort to work with this model across multiple threads, what with multiple managed object contexts, merging, etc.  Now we have three options – the original “Thread Confinement”, “Main Queue” and “Private Queue” with the latter two making heavy use of Grand Central Dispatch queues and blocks.

Things are certainly much better, but more options doesn’t make it any easier to know how to safely and efficiently implement multiple threads and avoid change conflicts and other issues that put your managed object context into an un-recoverable situation.  In this talk, Mark will discuss an approach that uses a set of simple rules to end up with a flexible Core Data application that is always thread safe, easy to maintain, and straightforward to keep your managed object context well managed using Apple’s new models and by keeping changes local to temporary managed object contexts.