• 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
CoreData and NSOperation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CoreData and NSOperation


  • Subject: CoreData and NSOperation
  • From: Alexander Griekspoor <email@hidden>
  • Date: Wed, 30 Jan 2008 22:40:25 +0000

Hi,

We know about core data and multi-threading, that you need one NSManagedObjectContext per thread to prevent trouble saving/accessing managed objects concurrently. How about NSOperation? Does the same apply there? Say I want to parse a big file into managedobjects, I would chunk it into pieces and have each piece be processed by an NSOperation. However, after processing it should end up as an NSManagedObject with a bunch of properties, all saved in one persistent store. Can you simply create a new object in the central MOC shared between all operations or do you need again one MOC per NSOperation, with the appropriate refreshing of your central MOC to update the UI? And what about saving your MOC at the end of each operation or should you wait till all operations have completed? I guess that depends one the one vs many MOCs as well. Any advise would be welcome!
Thanks,
Alex


**********************************************
         ** Alexander Griekspoor  PhD **
**********************************************
          mekentosj.com

 Papers - Your Personal Library of Science
 2007 Winner of the Apple Design Awards
         Best Mac OS X Scientific Solution
         http://www.mekentosj.com/papers
**********************************************

_______________________________________________

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


  • Prev by Date: Re: CoreData and insert in multithread
  • Next by Date: Re: Named image for regular folder?
  • Previous by thread: re: CoreData and insert in multithread
  • Next by thread: re: CoreData and NSOperation
  • Index(es):
    • Date
    • Thread