>From http://stackoverflow.com/questions/1383768/cloning-lua-state/1383847
I was thinking about using coroutines however I'm afraid a fatal
error in one coroutine will affect others that's why it's not option
atm. Thanks for the links! I'm currently looking at LuaJIT and
Rings. Rings seems to be a possible solution for my problem.
What can an error do inside a coroutine (a lua_State created with
lua_newthread), that it could not do inside a lua_State created with
lua_newstate?
lua_newthread gives you a garbage collected lua_State with all the
globals of your original state. Is this not what you want?
Asko, why would a server want to call lua_newstate or luaL_newstate
for each request, instead of lua_newthread?
Please tell me what I'm missing here.