lua-users home
lua-l archive

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

> My solution registers a hook function that executes based on the  
> count hook. It checks the current time and if execution has timed  
> out, it does a longjmp out of the interpreter and back into the host  
> application.

Why not simply call lua_error instead of longjmp? If you run Lua in a
cpcall cage, you can catch that error in the host app. That's what lua.c
does. --lhf