4 ms·
Python stops you from accidentally sharing mutable state across threads?
by kod 9y ago
Python stops you from accidentally sharing mutable state across threads?
- earenndil 9y agoYes. Look up the GIL (Global Interpreter Lock).
- kod 9y agoWhich is why Python doesn't have thread locking... Except, it does. Perhaps that's because GIL isn't really helpful for preventing logical races? Yet it encourages a false sense of security?
- dragonwriter 9y agoThe GIL doesn't stop you from sharing mutable state across threads, nor does it make it generally safe to do so.