Re: Accessing internal lock for atomic properties
Re: Accessing internal lock for atomic properties
- Subject: Re: Accessing internal lock for atomic properties
- From: Bill Bumgarner <email@hidden>
- Date: Sun, 05 Apr 2009 20:53:48 -0700
On Apr 5, 2009, at 8:50 PM, Eric Hermanson wrote:
I want to acquire the lock so that I can run some logic that
requires changing a set of variables atomically. I suppose I'm
going to have to create a new lock for this.
Yes -- the synthesized locks are only designed to ensure that the
value set/retrieved is integral regardless of # of threads pounding
upon it. Beyond that, it contributes nothing to thread safety.
Multi-property data dependencies must be expressed at a higher level,
typically by isolating sub-graphs of the objects of the model layer to
single threads (see Core Data).
b.bum
_______________________________________________
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