MCPcopy Create free account
hub / github.com/cuberite/cuberite / Execute

Method Execute

src/DeadlockDetect.cpp:63–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62
63void cDeadlockDetect::Execute(void)
64{
65 // Loop until the signal to terminate:
66 while (!m_ShouldTerminate)
67 {
68 // Check the world ages:
69 class cChecker :
70 public cWorldListCallback
71 {
72 public:
73 cChecker(cDeadlockDetect * a_Detect) :
74 m_Detect(a_Detect)
75 {
76 }
77
78 protected:
79 cDeadlockDetect * m_Detect;
80
81 virtual bool Item(cWorld * a_World) override
82 {
83 m_Detect->CheckWorldAge(a_World->GetName(), a_World->GetWorldAge());
84 return false;
85 }
86 } Checker(this);
87 cRoot::Get()->ForEachWorld(Checker);
88
89 cSleep::MilliSleep(CYCLE_MILLISECONDS);
90 } // while (should run)
91}
92
93
94

Callers

nothing calls this directly

Calls 1

ForEachWorldMethod · 0.80

Tested by

no test coverage detected