Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[JENKINS-25623]
previously, CpsThreadGroup.run() was greedy. It was running as much as it can before it returns. This means if the Pipeline script in question has an infinite loop, this method never returns. This prevents other activities to take place on CPS VM thread, most notably the attempt to kill the execution. In this change, CpsThreadGroup.run() is modified to execute just a little bit, not as much as it can, by using the new safepoint capability in groovy-cps. CpsThreadGroup.scheduleRun() is modified so that if the Pipeline Script is still runnable, the next chunk of execution is scheduled. Future implementation from scheduleRun() was simplified a bit. This code is really only used for testing, so it's not that important that the cancel() and other methods work correctly.
- Loading branch information
Showing
6 changed files
with
186 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.