mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-12 22:55:48 +00:00
Add a LogicError when a deadlock is detected
This commit is contained in:
committed by
Manoj doshi
parent
d3ee0df93a
commit
355a7b04a8
@@ -134,11 +134,15 @@ void LoadManager::run ()
|
||||
<< timeSpentDeadlocked.count() << " seconds.";
|
||||
}
|
||||
|
||||
// If we go over 500 seconds spent deadlocked, it means that
|
||||
// If we go over 90 seconds spent deadlocked, it means that
|
||||
// the deadlock resolution code has failed, which qualifies
|
||||
// as undefined behavior.
|
||||
//
|
||||
assert (timeSpentDeadlocked < 500s);
|
||||
constexpr auto deadlockTimeLimit = 90s;
|
||||
assert (timeSpentDeadlocked < deadlockTimeLimit);
|
||||
|
||||
if (timeSpentDeadlocked >= deadlockTimeLimit)
|
||||
LogicError("Deadlock detected");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user