Search notes:

Python standard library: threading.Lock

from threading import Lock
‥
lck = Lock()
with lck:
     do_something_critical()

Index