Most likely with an threading.Lock around any usage of that value. There’s no atomic modification in Python unless you use pypy (if you do, have a look at __pypy__.thread.atomic in stm version).
Most likely with an threading.Lock around any usage of that value. There’s no atomic modification in Python unless you use pypy (if you do, have a look at __pypy__.thread.atomic in stm version).