Your method example creates a new instance of the myClass class EACH TIME it is called, and stores the value of the parameters in its own instance variables. This is thread-safe.
I'm not sure that ALL static methods are thread-safe though. It is possible to access static global variables that are potentially shared by multiple threads from within a static method.
I'm sure there are probably other ways in which a static method could be thread-unsafe but it's late here in Australia and I can't think of another example right now sorry!
Someone please correct me if I'm wrong!
darkagn
Nearly a Posting Virtuoso
1,223 posts since Aug 2007
Reputation Points: 404
Solved Threads: 211
Skill Endorsements: 15
Question Answered as of 6 Months Ago by
darkagn