• 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
[SOLVED] Re: NSPersistentStoreCoordinator Wars Episode I: The Phantom Lock Menace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SOLVED] Re: NSPersistentStoreCoordinator Wars Episode I: The Phantom Lock Menace


  • Subject: [SOLVED] Re: NSPersistentStoreCoordinator Wars Episode I: The Phantom Lock Menace
  • From: Nick Zitzmann <email@hidden>
  • Date: Sun, 11 Jan 2009 17:14:13 -0700


On Jan 8, 2009, at 10:43 PM, Ben Trumbull wrote:

Why aren't you using a separate MOC for the main thread and the NSOperation ?


Because I'm used to programming for other databases (MySQL, OpenBase, ODBC, etc.) where locking and unlocking the main database connection as needed was "good enough".

So last Friday through this weekend, I've restructured my code so that each thread gets its own MOC. After I did that, the deadlock issue went away, so it was probably something I was doing all along.

Lesson learned: From now on, when I work on a multi-threaded database application, I'll create one MOC (CoreData) or database connection (other databases) per thread. Thanks to Ben and Miguel for their help.

Nick Zitzmann
<http://www.chronosnet.com/>



_______________________________________________

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


References: 
 >re: NSPersistentStoreCoordinator Wars Episode I: The Phantom Lock Menace (From: Ben Trumbull <email@hidden>)

  • Prev by Date: Re: Mac Pro memory sizes
  • Next by Date: NSWindow With Only Close Button?
  • Previous by thread: re: NSPersistentStoreCoordinator Wars Episode I: The Phantom Lock Menace
  • Next by thread: Weird problem: Application terminates unexpectedly after closing NSOpenPanel sheet
  • Index(es):
    • Date
    • Thread