On Tue Nov 29 05:00:35 2022 +0000, Ivo Ivanov wrote:
This cancels the thread pool timer on reset, so it won't call any pending callbacks. Otherwise it only removes the pending timers, which is not enough to stop the pending callbacks. This also allows us to remove the blocking KeCancelTimer() call from KeSetTimerEx(), which uses the thread pool implementation.
If callbacks are pending at this point, then they've been triggered and are just waiting for thread space to be executed. On the other hand, this isn't going to stop callbacks that are already in process. So this doesn't guarantee anything, and in light of that I don't see why cancelling queued callbacks is necessary or even helpful.