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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com