Using a global dictionary with threads in Python
Is accessing/changing dictionary values thread-safe?
I have a global dictionary
foo and multiple threads with ids
id2, ... ,
idn. Is it OK to access and change
foo's values without allocating a lock for it if it's known that each thread will only work with its id-related value, say thread with
id1 will only work with