Pergunta de entrevista da empresa Morgan Stanley

Multi-thread stuff like deadlock. How to avoid them.