lua-users home
lua-l archive

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


> 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.