Permalink
Browse files

Merge pull request #2 from jglick/AsynchronousExecution-deadlock-JENK…

…INS-34450

[JENKINS-34450] Work around deadlock in core
  • Loading branch information...
jglick committed Apr 26, 2016
2 parents b1505f8 + 26bc9d7 commit 5e95677577ae786b89245591ae9ea2fa3b20c5f6
Showing with 12 additions and 7 deletions.
  1. +12 −7 src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowRun.java
@@ -226,13 +226,18 @@ private AsynchronousExecution sleep() {
if (forShutdown) {
return;
}
try {
execution.interrupt(getExecutor().abortResult());
} catch (Exception x) {
LOGGER.log(Level.WARNING, null, x);
}
getExecutor().recordCauseOfInterruption(WorkflowRun.this, listener);
printLater("term", "Click here to forcibly terminate running steps");
Timer.get().submit(new Runnable() {
@Override public void run() {
Executor executor = getExecutor();
try {
execution.interrupt(executor.abortResult());
} catch (Exception x) {
LOGGER.log(Level.WARNING, null, x);
}
executor.recordCauseOfInterruption(WorkflowRun.this, listener);
printLater("term", "Click here to forcibly terminate running steps");
}
});
}
@Override public boolean blocksRestart() {
return execution.blocksRestart();

0 comments on commit 5e95677

Please sign in to comment.