Skip to content
Snippets Groups Projects
Commit 793ed13b authored by sfphoton's avatar sfphoton
Browse files

Bugfix: Tasks will now get in the waiting queue when resuming the RR scheduler not when stopping it

parent d653c2a3
No related branches found
No related tags found
No related merge requests found
...@@ -21,14 +21,17 @@ public class RR { ...@@ -21,14 +21,17 @@ public class RR {
} }
public void start() { public void start() {
if(!enabled) {
if (activeTask != null) waitingQueue.add(activeTask);
activeTask = null;
}
enabled = true; enabled = true;
} }
public void stop() { public void stop() {
enabled = false; enabled = false;
runningFor = 0; runningFor = 0;
if(activeTask!=null) waitingQueue.add(activeTask);
activeTask = null;
} }
public void add(Task t) { public void add(Task t) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment