Closed piojanu closed 5 years ago
Thanks for the question. It has nothing to do with threading. It just prevents the user from accidentally change the contents of the dictionary, because the config dictionary should only be edited inside configs.py.
Hi!
I wonder what is the function of this locking mechanism in
attr_dict.py:AttrDict
. Is it supposed to make setting attributes thread safe? If yes then, shouldn't you use some kind of mutex? Those operations of setting and unsetting the '_unlocked' parameters are guaranteed to be atomic?Thanks, Piotr