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

Core Data threading again


  • Subject: Core Data threading again
  • From: AurĂ©lien HugelĂ© <email@hidden>
  • Date: Wed, 01 Mar 2006 15:17:53 +0100

There is something i can't understand with core data.
I'm inserting objects in a moc in a thread. There is another moc in the main thread, and both mocs share the same persistent store coordinator.
When inserting the objects in the thread, some of its relation ships are mutated. When the relation ships are mutated, they inform via KVC/ KVO the views.
But since insertion is not done in the main thread, and not on the main thread moc (and thus not on the observed managed objects), my views do not refresh.


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 ?

i thought core data was designed with "one database-multiple process access" in mind. But what happens if a process mutates a relation ship and save, how am i supposed to reflect this in another process ?

Aurelien. desesperatly looking for help
_______________________________________________
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: Jeff LaMarche <email@hidden>
  • Prev by Date: Re: using openssl api
  • Next by Date: AddressBook corruption (2)
  • Previous by thread: Re: Multiple Toolbars, Same Window like XCode
  • Next by thread: Re: Core Data threading again
  • Index(es):
    • Date
    • Thread