3 ms·
GIL blocks parallelism for ThreadPool. But I have the same question as you have if we add another coming concurrency model: SubinterpreterThreadPool, which wil
by kzrdude 3y ago
GIL blocks parallelism for ThreadPool.
But I have the same question as you have if we add another coming concurrency model: SubinterpreterThreadPool, which will be possible with the per-interpreter GIL in python 3.12 and later.
That's another new model that is already confirmed to be coming: interpreters (isolated from each other) in the same process, that can run with each their own GIL.
- lucidyan 3y agoAre we talking about "PEP 554 – Multiple Interpreters in the Stdlib"[1] proposal? [1] https://peps.python.org/pep-0554/ https://peps.python.org/pep-0554/
- kzrdude 3y agoYes and https://peps.python.org/pep-0684/ https://peps.python.org/pep-0684/ which is no longer a proposal, but it's also been implemented in CPython 3.12. with PoC of the parallelization code being developed here https://github.com/jsbueno/extrainterpreters https://github.com/jsbueno/extrainterpreters