ScheduledWorkItem::ScheduleClear: remove item from runnable queue

The existing behavior is unexpected: if the work item is already on the
runnable queue, it will still be triggered after a call to ScheduleClear().
This can lead to race conditions.
This commit is contained in:
Beat Küng
2020-03-09 08:06:00 -04:00
committed by Daniel Agar
parent 977b80cee9
commit 18bc6cf872
4 changed files with 15 additions and 0 deletions
@@ -81,6 +81,10 @@ protected:
virtual ~WorkItem();
/**
* Remove work item from the runnable queue, if it's there
*/
void ScheduleClear();
protected:
void RunPreamble() { _run_count++; }