-
-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
I tried creating an automated regression test to verify good behavior for timer.cancel() and timer ID collisions.
... and I think I found a regression for the returned value from timer.cancel().
bool
cancel(Task &task)
{
struct task * const t = static_cast<struct task * const>(task);
if (t) {
remove(t);
task = static_cast<Task>(NULL);
return true;
}
return false;
}
Here's the regression: Now that a timer ID is just a pointer to the timer's slot in the array, it will never be 0... and so timer.cancel(anId) always returns true.
See #79 for the regression test and a fix.
Metadata
Metadata
Assignees
Labels
No labels