• 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: CoreData multithreading question: @synchronized
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData multithreading question: @synchronized


  • Subject: Re: CoreData multithreading question: @synchronized
  • From: Jim Correia <email@hidden>
  • Date: Wed, 4 Apr 2007 13:45:30 -0400

On Apr 4, 2007, at 1:28 PM, Ruotger Skupin wrote:

a short CoreData question. according to the manual:

Managed objects themselves are not thread safe. In order to work with a managed object across different threads, you should lock its context (see NSLocking).

The test you quoted from the documentation refers the the NSLocking protocol, which is wholly separate from @synchronize'd regions.


Furthermore, the same documentation says, quite explicitly:

http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/ Articles/cdMultiThreading.html

For locking, you should use the NSLocking methods on managed object context
and persistent store coordinator instead of implementing your own mutexes.


Finally, you may wish to consult the list archives for previous advice that has been given about this topic. In particular:

	http://lists.apple.com/archives/cocoa-dev/2007/Mar/msg00739.html

Jim
_______________________________________________

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:
This email sent to email@hidden


References: 
 >CoreData multithreading question: @synchronized (From: Ruotger Skupin <email@hidden>)

  • Prev by Date: Re: CoreData multithreading question: @synchronized
  • Next by Date: Re: characterAtIndex: method and composite characters (SOLVED)
  • Previous by thread: Re: CoreData multithreading question: @synchronized
  • Next by thread: CoreData multithreading question: locking multiple contexts
  • Index(es):
    • Date
    • Thread