Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
- Subject: Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
- From: mmalc Crawford <email@hidden>
- Date: Fri, 29 May 2009 14:59:35 -0700
On May 29, 2009, at 2:46 PM, Kyle Sluder wrote:
Can we please have some further clarification on this in the docs
please? r.6933634
The documentation states explicitly:
You can use this method to, for example, update a managed object
context on the main thread with work completed in another context in
another thread. You must, though, lock the receiver or otherwise
ensure thread safety (that is, the notification contents are handled
safely by Core Data, but the receiver's usage is still expected to
conform to the standard Core Data threading policies). For example,
you might implement a method to handle a notification that a worker
thread had finished saving as follows:
<http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObjectContext_Class/Reference/Reference.html#//apple_ref/doc/uid/TP30001182-SW8
>
Could you elaborate on what is unclear?
mmalc
_______________________________________________
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