Does this mean that even the Python 3.13 version is around the corner we have to expect some issues when running threads on a program? Maybe I’m slow today, but are the author complaining (rightfully so) about the buggy no-gil implementation? Should we wait until the feature is more stable before implementing new libraries? I was thinking on making use of it in new libraries I plan to develop. What are the most blata…
The article says that embedding (calling Python from C/C++) is currently buggy. It is not clear whether the Python interpreter was compiled with --disable-gil. I did not check the claim, since, as the article rightly points out, there are general issues in the Python space and other languages like Lua are far better for embedding.
500 Python Interpreters
31–35 of 35 posts
Re: 500 Python Interpreters
#32Earlier quoted context omitted.
Thanks, I’m not an embedded developer and was losing the train of thought of the author.
These threading issues may also be present when not using embedding. Embedding the interpreter frequently shows general threading bugs much quicker. In other words, when "torturing" the interpreter with embedding a threading bug might show up after 30 min. The same threading bug might show up once every 6 months in a web server (which is a nasty security risk, since it is hard to detect and to reproduce).
Re: 500 Python Interpreters
#33Earlier quoted context omitted.
These threading issues may also be present when not using embedding. Embedding the interpreter frequently shows general threading bugs much quicker. In other words, when "torturing" the interpreter with embedding a threading bug might show up after 30 min. The same threading bug might show up once every 6 months in a web server (which is a nasty security risk, since it is hard to detect and to reproduce).
Ouch. So we (app developers) are doomed with this feature?
Re: 500 Python Interpreters
#34> "No matter what happens there is going to be a lock occurring. No two PyThreadStates can execute Python bytecode at the same time. However, they can execute multiple C calls at the same time which is why for long running pure C operations extension and embedding developers are encouraged to release the GIL temporarily." Very exciting! I wonder what the first set of motivating applications are and what kind of perfo…
Re: 500 Python Interpreters
#35Earlier quoted context omitted.
The article says that embedding (calling Python from C/C++) is currently buggy. It is not clear whether the Python interpreter was compiled with --disable-gil. I did not check the claim, since, as the article rightly points out, there are general issues in the Python space and other languages like Lua are far better for embedding.
It might not have been obvious, but I used the currently available Python 3.12.5 release. However upon filing a ticket, and being asked for more testing, we found this issue persists into 3.13 and 3.14 alpha with and without the GIL disabled :(