• 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: Accessing internal lock for atomic properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Accessing internal lock for atomic properties (From: Eric Hermanson <email@hidden>)
 >Re: Accessing internal lock for atomic properties (From: Bill Bumgarner <email@hidden>)
 >Re: Accessing internal lock for atomic properties (From: Eric Hermanson <email@hidden>)
 >Re: Accessing internal lock for atomic properties (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: Accessing internal lock for atomic properties
  • Next by Date: Re: Need localization-proof method of transporting dates.
  • Previous by thread: Re: Accessing internal lock for atomic properties
  • Next by thread: "Word Wrap" and "Character Wrap" in NSTextField
  • Index(es):
    • Date
    • Thread