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

Method Run

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

Source from the content-addressed store, hash-verified

43 }
44
45 uint32 FDeadLoopCheck::FRunner::Run()
46 {
47 while (bRunning)
48 {
49 FPlatformProcess::Sleep(1.0f);
50 if (GuardCounter.GetValue() == 0)
51 continue;
52
53 TimeoutCounter.Increment();
54 if (TimeoutCounter.GetValue() < Timeout)
55 continue;
56
57 const auto Guard = TimeoutGuard.load();
58 if (Guard)
59 {
60 TimeoutGuard.store(nullptr);
61 Guard->SetTimeout();
62 }
63 }
64 return 0;
65 }
66
67 void FDeadLoopCheck::FRunner::Stop()
68 {

Callers

nothing calls this directly

Calls 2

SetTimeoutMethod · 0.80
GetValueMethod · 0.45

Tested by

no test coverage detected