Begin main content

Well Managed Objects

Presented at the 2011 Apple University Conference /dev/world conference.

Audience: Intermediate (Core Data knowledge useful, but not essential)


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.

You can see a screencast with audio recording of the talk courtesy of the Apple University Consortium on their website:

The code used in the demo is available on GitHub:

The presentation without the audio or the code demo isn't that informative, but if you really want that you can watch the slideshow on, or embedded below.