Profile

Click to view full profile
Hi, I'm Veerapat Sriarunrungrueang, an expert in technology field, especially full stack web development and performance testing.This is my coding diary. I usually develop and keep code snippets or some tricks, and update to this diary when I have time. Nowadays, I've been giving counsel to many well-known firms in Thailand.
view more...

Monday, January 27, 2014

Static method behavior in multiple threads (Java / C#)

Static method behaviors in multiple threads is the same to normal method that used from a class instance. The difference is that we can call it from class directly. Static method will create its own copies for its local variables because each thread has its own stack. The only things concerned in multiple threads are static fields, static objects. If the objects can be accessed from multiple threads, it need lock or synchronize.

References:

No comments:

Post a Comment