-
Notifications
You must be signed in to change notification settings - Fork 38.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easier policy setters for ThreadPoolTaskScheduler. #26813
Conversation
…nd ContinueExistingPeriodicTasksAfterShutdown policies. This closes an existing issue: spring-projects#26719"
@Aelykto Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@Aelykto Thank you for signing the Contributor License Agreement! |
@@ -64,6 +64,10 @@ | |||
|
|||
private volatile boolean removeOnCancelPolicy; | |||
|
|||
private volatile boolean executeExistingDelayedTasksAfterShutdownPolicy; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value in ScheduledThreadPoolExecutor
is true
. Does it matter if it's different?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you are actually correct and it matters for the getter:
if we don't have a scheduled executor inside our class - we return local value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fyi I added a default true value corresponding to scheduled thread pool executor
As per my comment on #26719, I ended up with a streamlined arrangement that does not include any policy getter methods. Thanks for the pull request, in any case! |
Added an easier way to set ExecuteExistingDelayedTasksAfterShutdown and ContinueExistingPeriodicTasksAfterShutdown policies. This closes an existing issue: #26719"