lua-users home
lua-l archive

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


Luiz,

thank you for this pointer; this looks very deadly to the LuaState ...

Question: is lua_close() signal-safe? I.e. can another (operating system) task interrupt the Lua interpreter executing the state L and call lua_close(L), no matter in which state the Lua interpreter was? What if the interpreter was in the middle of a GC?

If this is the case, it would make my life a lot easier..

--
Oliver

Am 16.07.2014 15:00, schrieb Luiz Henrique de Figueiredo:
If you want to kill a Lua thread and all its sibilings threads and
also its parent state, just call lua_close on any of these.

See http://www.lua.org/source/5.2/lstate.c.html#lua_close .

Just make sure your program does not continue to uses these Lua states.