[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How can I do sethook() to all coroutines of a Lua state?
- From: Oliver Kroth <oliver.kroth@...>
- Date: Wed, 16 Jul 2014 15:16:52 +0200
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.