• 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: Re: Accessor method styles
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Accessor method styles


  • Subject: Re: Re: Accessor method styles
  • From: "Shawn Erickson" <email@hidden>
  • Date: Tue, 29 Aug 2006 09:08:21 -0700

On 8/29/06, Andrew Merenbach <email@hidden> wrote:
Thanks to all who clarified for me.  I now have a great deal more
insight into the standard accessor idioms.

I should point out that none of the variants you listed are thread safe (not that you implied they are).

To gain thread safety use of locks or coherency domains/contracts
would need to be used... note placing locking inside of the setter is
often too granular to be useful, it really only helps to ensure the
object itself is internally consistent but code outside of that object
often needs locking to keep itself consistent as it manipulates your
object. In other words placing locking inside of a setter can easily
result in duplication of effort (overhead) without solving the larger
coherency needs of the application.

-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Accessor method styles (From: Andrew Merenbach <email@hidden>)
 >Re: Accessor method styles (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: Re: Accessor method styles
  • Next by Date: Re: Accessor method styles
  • Previous by thread: Re: Accessor method styles
  • Next by thread: Re: Accessor method styles
  • Index(es):
    • Date
    • Thread