1

I'm reading the Core Data Programming Guide and under the "Use Thread Confinement to Support Concurrency" section it mentions a recommended pattern:

Create a separate managed object context for each thread and share a single persistent store coordinator.

Can somebody point me to an example implementation of such a pattern?

I am particularly interested in implementations that handle blocks. We frequently put things in a block and add it to a queue...and sometimes those objects contain references to the main thread's MOC.

Monolo
  • 18,205
  • 17
  • 69
  • 103
Tim Reddy
  • 4,340
  • 1
  • 40
  • 77
  • See http://stackoverflow.com/questions/4800889/what-does-apple-mean-when-they-say-that-a-nsmanagedobjectcontext-is-owned-by-the for a discussion of this issue. – Seamus Campbell Dec 09 '11 at 21:16

1 Answers1

2

I know this is a old question but I found a really good tutorial for this aproach:
http://floriankugler.com/blog/2013/4/2/the-concurrent-core-data-stack
http://www.cimgf.com/2011/05/04/core-data-and-threads-without-the-headache/

I hope this help some one with the same question. :).

Goca
  • 1,743
  • 2
  • 15
  • 36
  • yes...this is an old question... :) The links are handy tho and are in line with what I've learned since I asked this question. – Tim Reddy Oct 01 '13 at 13:26