Core Data thread safety question
Core Data thread safety question
- Subject: Core Data thread safety question
- From: Andrew Merenbach <email@hidden>
- Date: Fri, 6 Jul 2007 10:12:17 -0700
Hi, all,
I have a Core Data program in which I want to do as much as possible,
for a logging scenario, in a background thread. I've read that Core
Data is not inherently thread-safe. But...
Is it possible to use *anything* in a separate thread? For instance:
NSEntityDescription *logNodeEntity = [NSEntityDescription
entityForName:@"LogNode" inManagedObjectContext:context];
What about:
[[AMLogNode allocWithZone:thisZone] initWithEntity:logNodeEntity
insertIntoManagedObjectContext:context]
?
Are both of these wrong to use in a separate thread, or are only
certain features of CD not thread-safe?
What about -setValue:forKey:? Is that thread-safe?
Cheers,
Andrew
_______________________________________________
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