[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [PATCH] lua_forcereturn()
- From: "Alexander Gladysh" <agladysh@...>
- Date: Sat, 19 Jul 2008 20:23:35 +0400
On Sat, Jul 19, 2008 at 4:52 PM, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br> 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,
Alexander.