lua-users home
lua-l archive

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

On Sat, Jul 19, 2008 at 4:52 PM, Luiz Henrique de Figueiredo
<> wrote:
>> Alexander Gladysh wrote:
>> 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.

Yes, I do mean OS thread, sorry for ambiguity.

Sorry for nagging you with silly questions, but is it 'officially'
safe to call lua_sethook() asynchronously (from another thread, when
lua_lock/lua_unlock are not defined)?

Thank you,