[IronPython] Multi threaded engine
Dino Viehland
dinov at microsoft.com
Mon Jun 7 23:16:12 CEST 2010
Jeff wrote:
> On Mon, Jun 7, 2010 at 9:53 AM, Dino Viehland <dinov at microsoft.com>
> wrote:
> > This is correct and is definitely the recommended way to do this.
> The
> > only reason to separate it out into separate ScriptEngine instances
> is
> > if you want isolation between the script engines themselves so that
> > one piece of user code cannot see another piece of user code.
>
> What do you mean be "see"? One script could potentially examine the
> code of another script in the same script engine?
For example you could import sys, publish an attribute on it, and another
script could read it. Or you could go in and change "min" or "max" in
__builtin__. Or you could go and mutate some read/write static field in
the .NET framework. Basically while everything is thread safe there's
no level of isolation between the scripts. It's probably nothing to be
too concerned about I thought I'd mention it for completeness.
More information about the Ironpython-users
mailing list