C#: Do I need to lock a static class when accessing from separate threads?

Posted by JimDaniel on Stack Overflow See other posts from Stack Overflow or by JimDaniel
Published on 2010-06-14T19:12:49Z Indexed on 2010/06/14 19:22 UTC
Read the original article Hit count: 133

Filed under:
|
|

I have a static class with a few methods that just take in a byte array, parses it, and returns a structure. I need to call these methods from many separate threads. Do I need a lock() or some kind of thread-safety within the methods? I can't get my head around it.

© Stack Overflow or respective owner

Related posts about c#

Related posts about threading