On Mon, May 25, 2020 at 11:19:06AM -0000, firstname.lastname@example.org wrote:
I like the topic on https://www.reddit.com/r/Python/comments/bpp9hg/has_the_python_gil_been_slai...
Answer written by CSI_Tech_Dept: ``` ... What probably needs to be done is to have a compile option that causes Python to work without GIL but at the cost of breaking some of API (this would especially broke C API), then developers would have an option to chose:
compatibility with GIL
no GIL, full multithreading, but broken compatibility
If user could decide which python version to use and there was a clear benefit, existing applications would be migrated, people would also make sure their code works with both versions. ... ```
We already have that. The version of Python with GIL is called CPython, and the version with "no GIL, full multithreading, but broken compatibililty" is called Jython, or IronPython. It is true that Jython and IronPython have fallen behind CPython, but even in the Python 2.5 and 2.6 days when IronPython in particular was well-funded by Microsoft, actively developed and *faster than CPython* people who wanted "full multithreading" didn't use it, preferring to complain about the GIL than migrate to another interpreter. The idea that people will make sure their code works in both versions is a pipe-dream. People in general don't even test their code with the -O switch in CPython.  Maybe the PSF should fund some development of Jython and IronPython to get them at least to version 3.1? I think it is healthy for the greater Python ecosystem to have active alternatives to CPython. -- Steven