Embedding multiple interpreters

Garthy garthy_nhtyp at entropicsoftware.com
Fri Dec 6 19:57:47 EST 2013


Hi Gregory,

On 07/12/13 08:39, Gregory Ewing wrote:
 > 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.

I am fortunate in my case as the normal impact of the GIL would be much 
reduced. The common case is only one script actively progressing at a 
time- with the others either not running or waiting for external input 
to continue.

But as you point out in your other reply, there are still potential 
concerns that arise from the smaller set of shared objects even across 
interpreters.

 > 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.

I wouldn't say that I wasn't concerned about it entirely, but on the 
other hand it is not a hard requirement to which all other concerns are 
secondary.

Cheers,
Garth



More information about the Python-list mailing list