News for hackers. Stuff that matters.
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.
Re:No-GIL mode coming for Python by wtetzner on Friday July 28, 2023 @08:21PM (#36915289)
Of course Java has thread safe collections in the standard library. ConcurrentHashMap etc. are popular in multithreaded contexts.
Re:No-GIL mode coming for Python by dpedu on Friday July 28, 2023 @08:27PM (#36915344)
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.
Re:No-GIL mode coming for Python by wtetzner on Friday July 28, 2023 @11:14PM (#36916502)
It's not a language feature in Python though. The GIL doesn't automatically make code thread safe.
Re:No-GIL mode coming for Python by lmm on Friday July 28, 2023 @08:57PM (#36915594)
It does, but you have to opt into them.