How to make a class Thread Safe

Viewed 41893

I am writing a C# application. I have (a kind of) logging class. and this logging class will be used by many threads. How to make this class thread safe? Should I make it as singleton? what are the best practices there? Is there a document that I can read about how to make it thread-safe?

Thanks

8 Answers
Related