News for hackers. Stuff that matters.
Re:Data races in Python, despite the Global Interpreter Lock by bb88 on Monday February 21, 2022 @05:04PM (#30421232)
The GIL is for internal python state. Not for atomic preservation of python data types.

I learned very early on that python threads should be treated like C threads, and therefore should be avoided. Also there really isn't a performance gain to using threads (other than maybe waiting for IO completion).

Re:Data races in Python, despite the Global Interpreter Lock by nneonneo on Monday February 21, 2022 @06:14PM (#30422000)
If you use C code that releases the GIL, you can see big speed ups with threads. A lot of C extension modules will drop the GIL. For instance, NumPy drops the GIL for many array operations, so threads can significantly speed up numeric workloads.