3 ms·
I think succinctness/laziness is the bigger reason you might want to avoid locking when writing multi-threaded Python code, not performance. If you're just writ
by alangpierce 9y ago
I think succinctness/laziness is the bigger reason you might want to avoid locking when writing multi-threaded Python code, not performance. If you're just writing to a global variable or an object attribute, it's nice to be able to coordinate that between threads without any additional ceremony. Ideally you wouldn't need to think about it, so it's annoying that it's nearly true but not quite fully true for Python.