[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [PATCH] lua_forcereturn()
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Sat, 19 Jul 2008 09:52:57 -0300
> Is it good to call lua_error() from another (watchdog) thread? I've
> got an impression that this would not work as intended.
If you mean OS thread there, then you need to use the technique used in
lua.c to handle interrupts: set a hook and then in the hook handle call
lua_error. This ensures that the target Lua thread will be in a good
state when it is interrupted.