| 85 | } |
| 86 | |
| 87 | void WaitObjectContainer::DetectNoWait(LastResultType result, CallStack const& callStack) |
| 88 | { |
| 89 | if (result == m_lastResult && m_noWaitTimer.ElapsedTime() > 1000) |
| 90 | { |
| 91 | if (m_sameResultCount > m_noWaitTimer.ElapsedTime()) |
| 92 | { |
| 93 | if (m_tracer) |
| 94 | { |
| 95 | std::string desc = "No wait loop detected - m_lastResult: "; |
| 96 | desc.append(IntToString(m_lastResult)).append(", call stack:"); |
| 97 | for (CallStack const* cs = &callStack; cs; cs = cs->Prev()) |
| 98 | desc.append("\n- ").append(cs->Format()); |
| 99 | m_tracer->TraceNoWaitLoop(desc); |
| 100 | } |
| 101 | try { throw 0; } catch (...) {} // help debugger break |
| 102 | } |
| 103 | |
| 104 | m_noWaitTimer.StartTimer(); |
| 105 | m_sameResultCount = 0; |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | void WaitObjectContainer::SetNoWait(CallStack const& callStack) |
| 110 | { |
nothing calls this directly
no test coverage detected