lua-users home
lua-l archive

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


Let's suppose I would want to yield every N instructions or a line of code. Yielding from hooks, as I had pointed out, is not a viable option. However, let's suppose that the hook function instead of direct yielding sets the flag in lua_State, say, kfWantToYield. Is there any place in Lua main VM that would be safe/suitable for calling lua_yield? Of course I can start making guesses following the path of trial and error, but may be someone could offer an insight on this off the top of their head. At least, what are the places that are/aren't worth considering for doing this.

Thanks,
Alex