lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

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.