Skip to content

Commit

Permalink
Execute ComputerListener#onIdle in another thread.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlatombe committed Aug 28, 2024
1 parent 64667af commit 9823b8e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/src/main/java/hudson/model/Computer.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.LogRecord;
import java.util.logging.Logger;
Expand All @@ -114,6 +115,7 @@
import jenkins.util.ErrorLoggingExecutorService;
import jenkins.util.Listeners;
import jenkins.util.SystemProperties;
import jenkins.util.Timer;
import jenkins.widgets.HasWidgets;
import net.jcip.annotations.GuardedBy;
import org.jenkins.ui.icon.Icon;
Expand Down Expand Up @@ -1103,7 +1105,7 @@ protected void removeExecutor(final Executor e) {
ciBase.removeComputer(Computer.this);
}
} else if (isIdle()) {
Listeners.notify(ComputerListener.class, false, l -> l.onIdle(this));
threadPoolForRemoting.submit(() -> Listeners.notify(ComputerListener.class, false, l -> l.onIdle(this)));
}
}
};
Expand Down

0 comments on commit 9823b8e

Please sign in to comment.