MCPcopy Create free account
hub / github.com/Tencent/UnLua / SetTimeout

Method SetTimeout

Plugins/UnLua/Source/UnLua/Private/LuaDeadLoopCheck.cpp:102–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100 }
101
102 void FDeadLoopCheck::FGuard::SetTimeout()
103 {
104 const auto L = Owner->Env->GetMainState();
105 const auto Hook = lua_gethook(L);
106 if (Hook == nullptr)
107 lua_sethook(L, OnLuaLineEvent, LUA_MASKLINE, 0);
108 }
109
110 void FDeadLoopCheck::FGuard::OnLuaLineEvent(lua_State* L, lua_Debug* ar)
111 {

Callers 1

RunMethod · 0.80

Calls 2

lua_gethookFunction · 0.85
lua_sethookFunction · 0.85

Tested by

no test coverage detected