[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: ANN: Lua OS 0.4
- From: Gregory Bonik <gregory@...>
- Date: Wed, 17 Aug 2011 11:01:00 +0400
As far as I can understand from your reference manual, all sandboxes in
one "cage" share one Lua VM. Is it safe to use multiple sandboxes with
different "powers" inside one VM? I guess you set a separate environment
for each thread, but anyway.
Second, I've read in the manual that it's possible to set a timeout for
a sandbox. This is really necessary, but shutting down the process which
exceeded the timeout doesn't seem a good idea to me. I guess you limit
the number of instructions via the debug hook. So is it possible to call
lua_yeild from the debug hook instead of terminating the sandbox? This
could be compared to the timer interrupt. In future, this could provide
a way to implement sort of preemptive multithreading. Yes, things get
complicated here since you'll need to implement a scheduler.