A task that produces a stable value is completed and is not queued again.
\begin{algorithm}
-\DontPrintSemicolon
+%\DontPrintSemicolon
\SetKwProg{Repeatt}{repeat}{}{end}
\KwData{queue = []\;}
\Begin{
\Repeatt{}{
- queue += communicateWithServer\;
+ time = currentTime()\;
+ queue += communicateWithServer()\;
stepped = []\tcp*{tasks stepped in this round}
- \While{notEmpty(queue) $\wedge$ earliestDeadline(top(queue)) $\leq$ currentTime}{
+ \While{$\neg$empty(queue) $\wedge$ earliestDeadline(top(queue)) $\leq$ time}{
(task, queue) = pop(queue)\;
task2 = step(task)\tcp*{computes new execution interval}
- \If{$\neg$ isStable(task2)\tcp*{not finished after step}}{
+ \If(\tcp*[f]{not finished after step}){$\neg$ isStable(task2)}{
stepped += task2\;
}
}