Re:No-GIL mode coming for Python
by dpedu on Friday July 28, 2023 @08:19PM
(#36915261)
That's not quite true. For example, most operations on lists and dicts are thread-safe in the current version of python. You can't say that about languages with true multithreading.
[ Parent
| on HN ]
Of course Java has thread safe collections in the standard library. ConcurrentHashMap etc. are popular in multithreaded contexts.
The difference is that it's a language feature in python whereas the java equivalents had to be written with locking or other approaches for handling concurrent access.
It's not a language feature in Python though. The GIL doesn't automatically make code thread safe.