| 61 | |
| 62 | |
| 63 | void 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 |
nothing calls this directly
no test coverage detected