|
The specific circumstance I'm thinking about is a situation where you are explicitly limiting the time spent in the interpreter due to system-wide constraints -- i.e., a non-preemptive environment where you have to yield on a regular basis. On a per-line basis isn't too bad, but would it trigger on something like: for index in table do print("Index: ["..index.."]") end, where the entire block is on a single line?
-G At 05:47 PM 3/21/2002 -0300, you wrote:
> Any plans to introduce an optional cycle limiter, to guard against infinite> loops and things like that? Such that I can say: lua_setcycles(50); > lua_dostring(...); and at 50 cycles in, it will yield back to the function > that called it with a LUA_YIELD return code, at which point I can call > lua_continue() or do something else... Hopefuly, you will be able to do that using the line hook. -- Roberto