Ericsson interview question

How did you make your code Thread Safe?