Re: NSPrivateQueueConcurrencyType working outside of performBlock
Re: NSPrivateQueueConcurrencyType working outside of performBlock
- Subject: Re: NSPrivateQueueConcurrencyType working outside of performBlock
- From: Trygve Inda <email@hidden>
- Date: Wed, 29 Jul 2015 07:35:27 -0700
- Thread-topic: NSPrivateQueueConcurrencyType working outside of performBlock
>
> “Setter methods on queue-based managed object contexts are thread-safe. You
> can invoke these methods directly on any thread”
>
> https://developer.apple.com/library/mac/documentation/Cocoa/Reference/CoreData
> Framework/Classes/NSManagedObjectContext_Class/index.html
>
In Apple's example, they use two different contexts, each with their own
NSPersistentStoreCoordinator. But the NSPersistentStoreCoordinators each
point to the same store file URL.
Where is it documented that this works?
If the NSPersistentStoreCoordinator instances are separate, how does it
actually work when they are both writing to the same store (potentially at
the same time)?
All Apple's notes say is:
To ensure that the application can remain responsive during this operation,
the view controller employs a second coordinator to manage interaction with
the persistent store. It configures the coordinator to use the same managed
object model and persistent store as the main coordinator vended by the
stack controller.
Trygve
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden