|
|
|
|
|
by pekk
4858 days ago
|
|
It's oversimplifying to say "This is Python so threads don't run concurrently because of the GIL". This is not a Python-language issue, it is an implementation-specific issue. Not all implementations of Python have the GIL. In reality, threads do run concurrently. Because in the CPython (itself written in C) with the famous GIL, it is normal and realistic to do I/O and heavy computation in C code that releases the GIL, enabling threads to work concurrently. There's no reason this information shouldn't be part of discussions on threads in Python. That doesn't mean threads are great for everything, but the severity of the case is easily and frequently overstated. |
|