• 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: Do I need private accessor methods?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Do I need private accessor methods?
      • From: Ryan Britton <email@hidden>
References: 
 >Do I need private accessor methods? (From: "Eric Lin" <email@hidden>)
 >Re: Do I need private accessor methods? (From: Ryan Britton <email@hidden>)

  • Prev by Date: Performance of updates to to-many relationships
  • Next by Date: changing NSComboBox number of visible items
  • Previous by thread: Re: Do I need private accessor methods?
  • Next by thread: Re: Do I need private accessor methods?
  • Index(es):
    • Date
    • Thread