• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
      • From: Kyle Sluder <email@hidden>
References: 
 >[Core Data] mergeChangesFromContextDidSaveNotification: and thread safety (From: AurĂ©lien HugelĂ© <email@hidden>)
 >Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety (From: Ben Trumbull <email@hidden>)
 >Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
  • Next by Date: Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
  • Previous by thread: Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
  • Next by thread: Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety
  • Index(es):
    • Date
    • Thread