• 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
Core Data thread safety question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Core Data thread safety question
      • From: Jim Correia <email@hidden>
  • Prev by Date: Re: Cross-platform toolkit with a Cocoa backend
  • Next by Date: Re: Core Data thread safety question
  • Previous by thread: Re: Cross-platform toolkit with a Cocoa backend
  • Next by thread: Re: Core Data thread safety question
  • Index(es):
    • Date
    • Thread