-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Add auto-configuration for general use TaskExecutor #5628
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
Conversation
/** | ||
* Maximum pool size for the executor. | ||
*/ | ||
private Integer maxPoolSize = 10; |
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 could see a spring.task.pool.max-size
in there to avoid multiple related properties in the root namespace.
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.
Agreed.
I've updated the PR with pool configuration properties holder, as per @snicoll's suggestion in comments. This also resolves #1563. |
Thanks. We're still working though some design considerations for how we'd like the |
@philwebb Thanks for the feedback. Could you share some details on the approach you'd like to take? I've got two other PRs (#4299 and #5066) that are somewhat dependent on the availability of general |
@vpavic we've not dug into the details yet I'm afraid. All we know is that we need to tread carefully and that we will need to liaise with some of the other teams (especially spring cloud). I know that's not very helpful, but we've been burnt in the past by adding features that had knock on effects later. It may take a little time to sort this one out. |
@philwebb Thanks for clarifying. |
This PR adds auto-configuration for general use
TaskExecutor
as described in #5082.Since Boot
1.4.0
uses Spring4.3.0
, the auto-configuredTaskExecutor
instance will also be picked up and used in@EnableAsync
scenarios.I'll update the documentation after the review.