500 Python Interpreters(izzys.casa) |
500 Python Interpreters(izzys.casa) |
Or is the functionality as of 3.13 still limited to low level python embedding applications?
It will also mean that we can use threads instead of processes and a lot of pain related tot his should disappear in long term.
Very exciting! I wonder what the first set of motivating applications are and what kind of performance gains are they expecting.
> static constexpr auto MAXIMUM_STATES = 463;
There is a joke here that I’m missing. Does anyone understand what it is?
This could be totes wrong, all from memory, too tired to fact check.
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 blatant use case to test this feature?
PD: So many questions, I know, sorry everybody!
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.
As to why it's "more popular", I guess you mean is getting more upvotes, that's part of the trick with submissions. Post it on a slow Friday work day before a holiday and you'll get more clicks than some other days or times.
Putting interpreter state behind a struct allows for multiple CPython instances per address space and each can no run on their own thread independently, they all get their own GI(L) lock. These interpreter instances would still have their own Global to This interpreter Lock, but not a Global lock for all CPython interpreters running in a process (like it was before with interpreter state in globals).
Unrelated but complementary. We could remove the GIL, making Python multithreaded, but if interpreter state was still in a handful globals, you could have only one interpreter per process.
Again, could be totes wrong.
It could be worse, however. My last design would flashbang you, even if you used darkreader
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).