[Python-ideas] Exposing CPython's subinterpreter C-API in the stdlib.
p.f.moore at gmail.com
Thu May 25 16:21:46 EDT 2017
On 25 May 2017 at 20:01, Eric Snow <ericsnowcurrently at gmail.com> wrote:
> More significantly, I genuinely believe that isolated
> interpreters in the same process is a tool that many people will find
> extremely useful and will help the Python community. Consequently,
> exposing subinterpreters in the stdlib would result in a stronger
> incentive for folks to fix the known bugs and find a solution to the
> challenges for extension modules.
I'm definitely interested in subinterpreter support. I don't have a
specific use case for it, but I see it as an enabling technology that
could be used in creative ways (even given the current limitations
involved in extension support).
Perl has had subinterpreter support for many years - it's the
implementation technique behind their fork primitive on Windows (on
Unix, real fork is used) and allows many common patterns of use of
fork to be ported to Windows. Python doesn't really have a need for
this, as fork is not commonly used here (we use threads or
multiprocessing where Perl would historically have used fork), but
nevertheless it does provide prior art in this area.
More information about the Python-ideas