Питоны замки
import threading
lock = threading.Lock()
lock.acquire()
# Do stuff
lock.release()
The Nic
import threading
lock = threading.Lock()
lock.acquire()
# Do stuff
lock.release()