Question d’entretien chez Yandex

Given a multithreaded code with a racing condition, find a mistake and correct the code