Embedding multiple interpreters

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Dec 6 23:09:11 CET 2013

Garthy wrote:
> To allow each script to run in its own environment, with minimal chance 
> of inadvertent interaction between the environments, whilst allowing 
> each script the ability to stall on conditions that will be later met by 
> another thread supplying the information, and to fit in with existing 
> infrastructure.

The last time I remember this being discussed was in the context
of allowing free threading. Multiple interpreters don't solve
that problem, because there's still only one GIL and some
objects are shared.

But if all you want is for each plugin to have its own version
of sys.modules, etc., and you're not concerned about malicious
code, then it may be good enough.

It seems to be good enough for mod_wsgi, because presumably
all the people with the ability to install code on a given
web server trust each other.


More information about the Python-list mailing list