Pregunta de entrevista de Revolut

2. How to ensure thread safety in this method