Helper object to help diagnose and detect deadlocked threads. More...
Public Member Functions | |
ThreadLiveCheck (double reportPeriod=10.0) | |
Configures the ThreadLiveCheck. More... | |
void | Report () |
This should be called at least once per the worker thread's loop. A message will be logged every few seconds (See ThreadLiveCheck() constructor). More... | |
Helper object to help diagnose and detect deadlocked threads.
Definition at line 8 of file ThreadLiveCheck.cs.
DLT.Meta.ThreadLiveCheck.ThreadLiveCheck | ( | double | reportPeriod = 10.0 | ) |
Configures the ThreadLiveCheck.
reportPeriod | How often the status of the monitored thread is reported, in seconds. Default 10 seconds |
Definition at line 18 of file ThreadLiveCheck.cs.
void DLT.Meta.ThreadLiveCheck.Report | ( | ) |
This should be called at least once per the worker thread's loop. A message will be logged every few seconds (See ThreadLiveCheck()
constructor).
If one or several of the worker threads stop responding, it is often due to a deadlock. Provided that the Report()
function is called on each thread loop iteration, the presence of absence of these report messages in the log may indicate which threads have locked up and ease diagnosis.
Definition at line 34 of file ThreadLiveCheck.cs.