[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: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 16 Jul 2014 10:00:47 -0300
> go from LuaState *L to the global state and from there to its main
> thread: G(L)->mainthread
> Then, shoot the boss :-)
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.