Browse Source

Fix bug of not stopping immediately on CANCEL while PAUSED.

The service threads do not terminate immediately, but, instead
each service thread picks up one more job before terminating,
causing servicing more jobs which are not reported back to portal.
tags/1.0.12
ymlam 3 years ago
parent
commit
053483a919
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/java/altk/comm/engine/Broadcast.java

+ 2
- 1
src/main/java/altk/comm/engine/Broadcast.java View File

@@ -290,7 +290,7 @@ public abstract class Broadcast
public void run()
{
myLogger.info("Thread starting...");
while (! serviceThreadsShouldStop())
for (;;)
{
if (serviceThreadsShouldPause())
{
@@ -308,6 +308,7 @@ public abstract class Broadcast
}
}
}
if (serviceThreadsShouldStop()) break;
// Get a batch of jobs, if available
myLogger.debug("Looking for jobs");
List<Job> batch = new ArrayList<Job>();


Loading…
Cancel
Save