Closed elsevers closed 2 years ago
Thanks @elsevers, a few comments:
v1.0.x
(i.e. the default branch) and then changed to merge to develop
, is this correct? So, this PR is doing your fix + getting develop
up-to-date with v1.0.x
. If so, I think you should redo your change but base it on develop
so that the 3 extra commits are not in your PRrunning_task
the "problem task" ...it just happened to be running when the time slice was over run. Consider two tasks A
and B
: A
takes 98% of the time slice and B
takes 5%. The code will print B
is the issue, but in reality, it is more complicated since A
was probably the real issue. For this reason, I think your change will end up confusing users, but perhaps it is ok. The real way to debug overruns is to profile all tasks and look at run-time timing stats, but this is more complex. I think the actual real solution is to go to a preemptive scheduler in a real RTOS... :)Thanks @elsevers, a few comments:
1. Based on the 3 commits on this PR before your commit, I think you probably made this edit based on `v1.0.x` (i.e. the default branch) and then changed to merge to `develop`, is this correct? So, this PR is doing your fix + getting `develop` up-to-date with `v1.0.x`. If so, I think you should redo your change but base it on `develop` so that the 3 extra commits are not in your PR 2. You cannot really call the `running_task` the "problem task" ...it just happened to be running when the time slice was over run. Consider two tasks `A` and `B`: `A` takes 98% of the time slice and `B` takes 5%. The code will print `B` is the issue, but in reality, it is more complicated since `A` was probably the real issue. For this reason, I think your change will end up confusing users, but perhaps it is ok. The real way to debug overruns is to profile all tasks and look at run-time timing stats, but this is more complex. I think the actual real solution is to go to a preemptive scheduler in a real RTOS... :)
v1.0.x
and develop
that these were pointing to the same commit, but they are not. I have resolved this issue by re-basing this branch onto develop
ERROR: CURRENT TASK IS [...]
. Thoughts?
The scheduler produces an error when a task exceeds the allotted time quantum and displays an error message on the terminal. This PR modifies that error message to include the problem task's name.