-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Provide a general use TaskExecutor for background tasks #5082
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
Comments
👍 |
I have such a need on start.spring.io as well: I'd like to process events asynchronously and it would be nice if I could easily configure an |
👍 |
Like @philwebb mentioned, spring-cloud has the need as well, see spring-cloud/spring-cloud-consul#146 |
@sunlin901203 As @snicoll already asked, please use Stack Overflow for this sort of question |
i only want to config a executor in @Bean(name="taskExecutor")
public TaskExecutor taskExecutor() {
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
taskExecutor.setMaxPoolSize(this.poolSize);
taskExecutor.setQueueCapacity(this.queueCapacity);
taskExecutor.afterPropertiesSet();
return new ThreadPoolTaskExecutor();
} too.i want config executor simple in application.properties like <task:executor id="taskExecutor" pool-size="20" queue-capacity="20"/> |
Any feedback on the current status of this issue, considering it was recently removed from the |
It's something that we want to do, but it's not going to make it into 1.4 |
Are there any chances we'll see this in Boot 2.0? Thanks. |
@vpavic Yeah, I'd love to see this in 2.0 but we won't get to it for a while. We've front loaded the 2.0 plan with all the reactive work and breaking changes (basically anything that we can't slip). |
As with Spring 5.0.8 a new warning is logged, I guess more and more people would find a global AsyncTaskExecutor helpful (or at least one for Spring MVC) which can be configured via properties.
|
p.s. #1563 looks duplicate |
Several parts of Spring Boot, and even more Spring Cloud could benefit from running tasks in the background or in parallel (see #5066 for example). It would be useful if we provided a common
TaskExecutor
so that threads could be shared.The text was updated successfully, but these errors were encountered: