[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: merging lua files
- From: Valerio Schiavoni <valerio.schiavoni@...>
- Date: Wed, 7 Jul 2010 20:01:17 +0200
On Wed, Jul 7, 2010 at 6:35 PM, Jim Jennings
<jennings.durham.nc+lua@gmail.com> wrote:
> In general, re-using the same vm to run independent 'jobs' can expose
> you to a surprising number of ways in which one piece of Lua code can
> interfere with another. This is due to Lua's greatest strength (imo)
> which is that it allows you to modify how it works (metatables,
> environments are tables, get/setfenv, loadstring, package.*, etc.).
> If you must re-use the same vm for many jobs, you should consider
> locking down the Lua environment in which each job runs, in order to
> create a predictable final state when one job finishes and you are
> ready to start another.
It is already the case. Each job runs in its own isolated sandboxed environment.
> system to provide this. See http://lua-users.org/wiki/JimJennings for
> information and source code (pure Lua) for the Darwin module system.
I will look at this.
And thanks for the detailed explanation.
Valerio