We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
there is a loop in lua file, and i call lua.DoFile() run it with block,how can i stop or restart lua vm but keep my main program process
lua.DoFile()
The text was updated successfully, but these errors were encountered:
Hello @HarryChen001,
The original "C" Lua engine has a debug feature to limit the CPU time. But I'm not sure if the GO version has such feature!
The Lua manual https://www.lua.org/manual/5.2/manual.html#lua_sethook has a function description to hook the Lua VM and limit the CPU usage.
int lua_sethook (lua_State *L, lua_Hook f, int mask, int count);
It's something like this:
lua_sethook(L, hook_func, LUA_MASKCOUNT, num_instructions_per_hook);
I guess, we should read the documentation or source code to findout!
@fbogsany,
Do we have anythink like that in go-lua?
Sorry, something went wrong.
No branches or pull requests
there is a loop in lua file, and i call
lua.DoFile()
run it with block,how can i stop or restart lua vm but keep my main program processThe text was updated successfully, but these errors were encountered: