34 void Start(
int a_IntervalSec);
72 virtual void Execute(
void)
override;
std::chrono::duration< signed long long int, cTickTime::period > cTickTimeLong
void UntrackCriticalSection(cCriticalSection &a_CS)
Removes the CS from the tracking.
void CheckWorldAge(const AString &a_WorldName, cTickTimeLong a_Age)
Checks if the world's age has changed, updates the world's stats; calls DeadlockDetected() if deadloc...
int m_IntervalSec
Number of secods for which the ages must be the same for the detection to trigger.
void ListTrackedCSs()
Outputs a listing of the tracked CSs, together with their name and state.
virtual ~cDeadlockDetect() override
cCriticalSection m_CS
Protects m_TrackedCriticalSections from multithreaded access.
void SetWorldAge(const AString &a_WorldName, cTickTimeLong a_Age)
Sets the initial world age.
void DeadlockDetected(const AString &a_WorldName, cTickTimeLong a_WorldAge)
Called when a deadlock is detected in a world.
std::map< AString, sWorldAge > WorldAges
Maps world name -> sWorldAge.
void TrackCriticalSection(cCriticalSection &a_CS, const AString &a_Name)
Adds the critical section for tracking.
std::vector< std::pair< cCriticalSection *, AString > > m_TrackedCriticalSections
CriticalSections that are tracked (their status output on deadlock).
virtual void Execute(void) override
This function, overloaded by the descendants, is called in the new thread.
cTickTimeLong m_Age
Last m_WorldAge that has been detected in this world.
int m_NumCyclesSame
Number of cycles for which the age has been the same.
cIsThread(AString &&a_ThreadName)
void Start(void)
Starts the thread; returns without waiting for the actual start.