See (bottom of page): http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/coredata/Articles/cdConcurrency.html#//apple_ref/doc/uid/TP40003385-SW1
"If you share a managed object context or a persistent store coordinator between threads, you must ensure that any method invocations are made from a thread-safe scope. For locking, you should use the NSLocking methods on managed object context and persistent store coordinator instead of implementing your own mutexes. These methods help provide contextual information to the framework about the application's intent—that is, in addition to providing a mutex, they help scope clusters of operations." On 2011-11-29, at 3:08 PM, Laurent Daudelin wrote: > I'm working on some code that I didn't write and have some core data areas > that use [managedObjectContext lock] and [managedObjectContext unlock] while > other areas in the code uses @synchronized. I know that @synchronized is a > convenience to create a mutex lock so that not 2 threads can acquire the same > lock at the same time but are there other differences? Is one better than the > other? > > Thanks for any insight on this! > > -Laurent. > -- > Laurent Daudelin > AIM/iChat/Skype:LaurentDaudelin > http://www.nemesys-soft.com/ > Logiciels Nemesys Software > laur...@nemesys-soft.com > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > 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: > http://lists.apple.com/mailman/options/cocoa-dev/dave.fernandes%40utoronto.ca > > This email sent to dave.fernan...@utoronto.ca _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com