Pergunta de entrevista da empresa Revolut

2. How to ensure thread safety in this method