Revolut Interview Question

2. How to ensure thread safety in this method