[This is preliminary documentation and subject to change.]
Calling this identifies that the thread is still making progress by resetting the Counter.
This method should be called (directly or indirectly) whenever a thread makes significant progress, such as when it is about to start processing the next file during loading. It must never be called inside a loop which is not guaranteed to exit (such as a while-true loop). It may be called within a loop that has fixed, known bounds (such as a typical for loop).
The requirements on when this should be or not be called are important: failure to call this (directly or indirectly) during a long but guaranteed-to-terminate loop will cause unnecessary hang reports, and calling this during a potentially infinite loop will result in hangs that are not reported.
When it doubt, and for processes which are expected to take considerable time, the SpecialDispensationFactor may be used to temporarily grant the thread more time to work before considering it to have stopped responding.
void Test(WatchdogToken token) { // Increase available working time. token.SpecialDispensationFactor *= 10; // ... long-running process here ... // Reset available working time. token.SpecialDispensationFactor /= 10; }