How to/best practices to write a thread safe code?

How to/best practices to write a thread safe code? Also how to identify if a code is thread safe or not?

Comments (24)