lua-users home
lua-l archive

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


> 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