How to solve race condition in python

join shbcf.ru