Class ChecksPublishingQueue
A pipeline requests its checks from listeners that run on the build's CPS VM thread: progress updates from a
GraphListener, and the completed check from
RunListener.onCompleted(R, hudson.model.TaskListener), which WorkflowRun fires on that thread too.
Publishing makes blocking calls to the SCM API, so doing it on that thread stops the pipeline until every call
returns. This class moves the work to a small background pool instead.
Each run has at most one progress update waiting and one being published. A new progress update replaces the waiting one, and its output is computed when it is published, so it always shows the latest state.
Completed checks have their own pool, so they never wait behind the progress updates of other runs. Completing a run discards its waiting progress update, and the completed check is published after the one being published, if any, so a progress update can never overwrite the completed check. Nothing waits on the calling thread.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWaits for completed checks when Jenkins shuts down. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstart()Creates new pools if a previous Jenkins in the same JVM shut them down, as in tests.
-
Method Details
-
start
Creates new pools if a previous Jenkins in the same JVM shut them down, as in tests.
-