2 ms·
Simple time sharing between low-priority, potentially long-running programs submitted by untrusted users.
by pekk 14y ago
Simple time sharing between low-priority, potentially long-running programs submitted by untrusted users.
- StavrosK 14y agoRun a process per script and let the OS handle it, probably.
- gngeal 14y agoYou don't even need to do that, you can run Lua in a multithreaded program, as long as no lua_State is accessed from multiple threads. You can spawn independent interpreter states, have them do their job and terminate. The whole Lua codebase as such is completely stateless (apart from the state that you keep for your code). The shorter the scripts actually run, the smaller overhead you get by this.
- pekk 14y agoThat isn't what I asked about and isn't really helpful
- StavrosK 14y agoDon't read it, I guess? I don't know any other way to do it, unfortunately. I'm sorry I wasted your time.