Re: Accessing internal lock for atomic properties
Re: Accessing internal lock for atomic properties
- Subject: Re: Accessing internal lock for atomic properties
- From: Eric Hermanson <email@hidden>
- Date: Sun, 05 Apr 2009 23:56:23 -0400
Yes, I understood that, but I figured if all of the synthesized set
methods are using the same lock, then I could probably take advantage
of that same lock if it were available to me do to some stuff
internally on that object. Anyway, thanks for the confirmation.
- Eric
On Apr 5, 2009, at 11:53 PM, Bill Bumgarner wrote:
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