• 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 threading again
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data threading again


  • Subject: Re: Core Data threading again
  • From: Jeff LaMarche <email@hidden>
  • Date: Wed, 1 Mar 2006 11:38:31 -0500

On Mar 1, 2006, at 9:17 AM, Aurélien Hugelé wrote:

This is normal. But then what is the point of core data threading ? how can the views reflect the modifications made to objects that are done in another thread ? using refreshObject:mergeChange:/ objectWithID: does nothing here, the KVO mechanism can simply not work in another thread.

are we FORCED to do everything except fetches in the main thread ?

The point of threading with Core Data is the same as it is with anything else, and no, we're not forced to do everything on the main thread. What we do have to do is somehow inform the main thread's MOC that there are new, changed, or deleted objects in its store. This is usually done by passing the MO's unique identifier between threads. A given object in a single persistent store will always have the same unique identifier in all MOCs.


I believe that MacTech is going to be running an article in the March issue (possibly April) that gives some code samples showing how to use threads with Core Data.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Core Data threading again
      • From: Aurélien Hugelé <email@hidden>
References: 
 >Core Data threading again (From: Aurélien Hugelé <email@hidden>)

  • Prev by Date: immutable copy of NSMutableDictionary but not a deep copy
  • Next by Date: Re: immutable copy of NSMutableDictionary but not a deep copy
  • Previous by thread: Core Data threading again
  • Next by thread: Re: Core Data threading again
  • Index(es):
    • Date
    • Thread