Re: Do I need private accessor methods?
Re: Do I need private accessor methods?
- Subject: Re: Do I need private accessor methods?
- From: "Shawn Erickson" <email@hidden>
- Date: Fri, 28 Apr 2006 18:29:54 -0700
On 4/28/06, Ryan Britton <email@hidden> wrote:
They are very useful for ensuring your code is threadsafe. For this
reason alone I recommend using them.
Often the locking you would implement via accessors (inside of) is too
granular, as a result it could add overhead while not really gaining
you thread safety. In other words you often have to do more they just
use synchronize in your accessor to ensure thread safety... just make
sure you are doing it for the right reasons and in the right way (tm).
-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