• 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
Re: Weird Core Data crash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Weird Core Data crash


  • Subject: Re: Weird Core Data crash
  • From: Fritz Anderson <email@hidden>
  • Date: Tue, 29 Nov 2011 07:51:32 -0600

On 29 Nov 2011, at 7:21 AM, Andrew Kinnie wrote:

> This method may be called from the main thread or from a background thread, but is always called using performSelectorInBackground.

It's not enough that you divert the call to _a_ background thread. You must send it to _the_ background thread that owns the managed-object context.

If necessary (you can't exchange the data between threads through non-CD immutable types), each thread that does business with your persistent store should have its own MOC, coordinate its content with NSManagedObjectContextDidSaveNotification, and query/update the store only through its MOC.

	— F

_______________________________________________

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: Weird Core Data crash
      • From: Andrew Kinnie <email@hidden>
References: 
 >Weird Core Data crash (From: Andrew Kinnie <email@hidden>)

  • Prev by Date: Re: How to display HTML in proper format in a NSTextView
  • Next by Date: Re: NSTableView Bindings and Numbered Lines...
  • Previous by thread: Weird Core Data crash
  • Next by thread: Re: Weird Core Data crash
  • Index(es):
    • Date
    • Thread