When they say per interpreter GIL in PEP 684, is that per thread? I wasn't aware of multiple interpreters in one process.
This could be totes wrong, all from memory, too tired to fact check.
11–20 of 35 posts
When they say per interpreter GIL in PEP 684, is that per thread? I wasn't aware of multiple interpreters in one process.
This could be totes wrong, all from memory, too tired to fact check.
When they say per interpreter GIL in PEP 684, is that per thread? I wasn't aware of multiple interpreters in one process.
When they say per interpreter GIL in PEP 684, is that per thread? I wasn't aware of multiple interpreters in one process.
Afaik, you could have multiple CPython interpreters per process before, but the GIL was global to the address space, not a per interpreter instance. I believe the GIL work also put interpreter state behind a single struct instead of a handful of global variables. This could be totes wrong, all from memory, too tired to fact check.
Earlier quoted context omitted.
Afaik, you could have multiple CPython interpreters per process before, but the GIL was global to the address space, not a per interpreter instance. I believe the GIL work also put interpreter state behind a single struct instead of a handful of global variables. This could be totes wrong, all from memory, too tired to fact check.
These were two separate and mostly unrelated PEPs but otherwise that's correct.
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.
> static constexpr auto MAXIMUM_STATES = 463;
There is a joke here that I’m missing. Does anyone understand what it is?
> // 500 interpreter states > static constexpr auto MAXIMUM_STATES = 463; There is a joke here that I’m missing. Does anyone understand what it is?
Or is the functionality as of 3.13 still limited to low level python embedding applications?
> // 500 interpreter states > static constexpr auto MAXIMUM_STATES = 463; There is a joke here that I’m missing. Does anyone understand what it is?
In the TV show "The Orville" a character has their matter replicator create "500 cigarettes", but it only created 463 after someone counted them all. This is a meme that's been making the rounds for a few weeks in some circles now.
Is 463 some joke I'm not getting?