I understand that static methods are not associated with the this keyword since 
they are class level methods.  In your initial post you had mentioned something 
about critical sections and how static methods improve performance, do you mean 
sections that are accessed in a serialized fashion or are you using the phrase 
critical section in a different context?

Sent from my iPhone

On Aug 18, 2010, at 6:33 AM, Sean Owen <[email protected]> wrote:

> There aren't thread safety issues with static vs instance methods per
> se, no. You could write thread-safe or -unsafe code either way. It
> only concerns whether the methods are attached to a 'this'.
> 
> On Wed, Aug 18, 2010 at 2:26 PM, Saikat Kanjilal <[email protected]> wrote:
>> On this topic there are repercussions with using static methods related to 
>> thread safety and unpredictable behavior when a static method modifies a 
>> data structure shared between threads and race conditions associated with 
>> this.  In general do you all have guidelines as to when to use instance 
>> versus static methods? Doesn't it also depend on how the chunk of code is 
>> being called?
> 

Reply via email to