Skip to content

Commit

Permalink
MultiJobBuilder.java: Sleep in the subtask polling loop
Browse files Browse the repository at this point in the history
Without the sleep, the thread keeps polling and updating the subtask which causes a very high CPU usage.
This fixes [JENKINS-21649] and [JENKINS-21798]

Signed-off-by: Nicolas Morey-Chaisemartin <nmorey@kalray.eu>
  • Loading branch information
nmorey committed Feb 17, 2014
1 parent 36e5613 commit f9a88fd
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -207,6 +207,12 @@ public void run() {
}
if (future.isDone())
break;
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
future.cancel(true);
throw new InterruptedException();
}
}
if (jobBuild != null) {
result = jobBuild.getResult();
Expand Down

0 comments on commit f9a88fd

Please sign in to comment.