Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data & threads [re: Ping: Look for hints for "nested transaction" problem with Core Data]



Hello,

The "nested transaction" error is an error you'll get exclusively in the event of a mistake with threads.
We strongly discourage people from sharing managed objects or managed object contexts between threads.

Thank you very much for your very, very detailed response.
Can I summarize with "if I use several thread, I should use one NSManagedObjectContext per thread" ?
But in this case, how can I set a background thread to regularly save the context ?
Moreover I did not understand which mechanism will prevent these managedObjectContexts to clash when accessing the same persistent store.


Regards,

Pierre Chatelier
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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/email@hidden

This email sent to email@hidden
References: 
 >Core Data & threads [re: Ping: Look for hints for "nested transaction" problem with Core Data] (From: Ben Trumbull <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.