by rbanffy · 5y ago · 0 comments
Thanks to the GIL, multithreaded Python code doesn't have to worry too much (you do, a little) about shared mutable objects.
The only safe way to do shared state between threads in CPython is locks/mutexes/message passing/etc. Even things like a simple addition to an integer are absolutely not made thread safe by the GIL.