• 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: Snow Leopard, core data, read only and multiple threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: Snow Leopard, core data, read only and multiple threads


  • Subject: re: Snow Leopard, core data, read only and multiple threads
  • From: Ben Trumbull <email@hidden>
  • Date: Sun, 27 Sep 2009 19:43:05 -0400

I've got an app that worked on Leopard. I ported it to Snow Leopard SDK 10.6, and now it works on Snow Leopard, but it doesn't work correctly on Leopard anymore. I haven't changed anything that ought to affect this.

What doesn't work ?

It's an app with a foreground gui that writes an XML coredata store. A background thread reads the repository and takes action. Both threads have the full core data stack with their own coordinators. As soon as I activate the background thread, the XML store gets set to zero bytes.

The XML store is an atomic store. Everything is loaded at once, and everything is written out for each save. Very NSDocument like. Like TextEdit. Two people open up Text Edit, pointed to the same path mounted over a shared volume. What happens ?


You almost certainly want to use the SQLite store, or have the stacks work with different XML files.

When I encountered the problem I read the doco and I added the NSReadOnlyPersistentStoreOption when calling addPersistentStoreWithType in the background thread, but that hasn't helped. It wasn't necessary before.

NSReadOnlyPersistentStoreOption doesn't have anything to do with multi- threading.


You sure you're not saving a MOC ?

- Ben

_______________________________________________

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: Looking for Sample code: WWDC2007 - Session 201 - Building Animated Cocoa User Interfaces
  • Next by Date: Re: redrawing a particular subview in non mainWindows.
  • Previous by thread: Snow Leopard, core data, read only and multiple threads
  • Next by thread: redrawing a particular subview in non mainWindows.
  • Index(es):
    • Date
    • Thread