The docs are ambiguous at best.
In my testing, you do not need to use a queue to attach the NSManagedObjectContext
to its parent or the NSPersistentStoreCoordinator
.
If you are doing a NSConfinmentConcurrencyType
I set the parent or coordinator on the thread that created it (since that is the thread that can use it).
If you are doing a NSPrivateQueueConcurrencyType
I set the parent or coordinator on the thread that created it as well. It is the usage of the NSManagedObjectContext
that is confined or restricted to the private queue. I define the usage as executing a fetch, deleting an object, etc. Configuring the NSManagedObjectContext
is not restricted.
This of course is not in the documentation but the results were produced through testing back when accessing a NSManagedObjectContext
incorrectly caused an exception.