Re: Re: Accessor method styles
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