Skip to content

Terminate all worker threads when parallel execution times out#379

Open
sharkister wants to merge 4 commits intojenkinsci:masterfrom
sharkister:master
Open

Terminate all worker threads when parallel execution times out#379
sharkister wants to merge 4 commits intojenkinsci:masterfrom
sharkister:master

Conversation

@sharkister
Copy link
Contributor

This pull request introduces a safeguard to ensure that all worker threads are properly terminated when a timeout occurs during parallel task execution.

Without explicit cancellation and shutdown, tasks may continue running after a timeout, leading to a never-ending Jenkins pipeline. This change improves resource cleanup, prevents lingering threads, and ensures predictable behavior and better system stability.

Testing done

  • Verified with a set of long-running tasks.
  • Confirmed that all tasks are either completed or interrupted after timeout.
  • No lingering threads observed post-shutdown.

@sharkister sharkister requested a review from a team as a code owner October 3, 2025 19:48
@sharkister
Copy link
Contributor Author

Hi @olamy,
Please review ☺️
Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant