Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

Aelykto
Copy link

@Aelykto Aelykto commented Apr 15, 2021

Added an easier way to set ExecuteExistingDelayedTasksAfterShutdown and ContinueExistingPeriodicTasksAfterShutdown policies. This closes an existing issue: #26719"

…nd ContinueExistingPeriodicTasksAfterShutdown policies. This closes an existing issue: spring-projects#26719"
@pivotal-issuemaster
Copy link

@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.

@pivotal-issuemaster
Copy link

@Aelykto Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 15, 2021
@@ -64,6 +64,10 @@

private volatile boolean removeOnCancelPolicy;

private volatile boolean executeExistingDelayedTasksAfterShutdownPolicy;
Copy link

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?

Copy link
Author

@Aelykto Aelykto Apr 16, 2021

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.

Copy link
Author

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

@jhoeller
Copy link
Contributor

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!

@jhoeller jhoeller closed this Jul 13, 2021
@bclozel bclozel removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 18, 2022
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.

None yet

6 participants