Re: Core Data and multithreading (was Re: [Core Data] Improve save performance ?)
Re: Core Data and multithreading (was Re: [Core Data] Improve save performance ?)
- Subject: Re: Core Data and multithreading (was Re: [Core Data] Improve save performance ?)
- From: Chris Hanson <email@hidden>
- Date: Tue, 17 Jan 2006 15:57:40 -0800
On Jan 17, 2006, at 11:56 AM, Eric Morand wrote:
Le 17 janv. 06 à 19:56, Chris Hanson a écrit :
When working with Core Data, you MUST NOT interact with a managed
object context from multiple threads without appropriately locking
it. This is a requirement. There is no way to get around it.
There are no situations where it is unnecessary. Any situation
you find where it may appear unnecessary or where it seems to be
working is a bug waiting to manifest.
I obviously lock the context before saving in my detached thread
(and unock after). :o)
Yes, but are you also locking around all uses of the context in the
main thread? If you have any bindings to managed objects registered
with that context, by definition that is not the case.
-- Chris
_______________________________________________
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