lua-users home
lua-l archive

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


Luiz,
thanks a lot for the help and pointers to the relevant Lua code! This
is exactly what I have been looking for.

Thanks and Best Regards,
--Leo--

On 10/30/06, Luiz Henrique de Figueiredo <lhf@tecgraf.puc-rio.br> wrote:
> How would  count hook help me if my foo() functions is blocking inside?

It does not.

> Can I use lalarm to break out from Lua function? Would setjmp/longjmp
> used in alarm handler leave Lua in inconsistent state?

Like I said, you have to be careful. In the alarm handler you have to set
a hook, just that. In the hook you call error. That's what lua.c does:
        http://www.lua.org/source/5.1/lua.c.html#laction
        http://www.lua.org/source/5.1/lua.c.html#lstop