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

Configure WebFlux's support for blocking execution to use the auto-configured AsyncTaskExecutor #36331

Closed
wilkinsona opened this issue Jul 11, 2023 · 0 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@wilkinsona
Copy link
Member

We do this at the moment for MVC:

@Override
public void configureAsyncSupport(AsyncSupportConfigurer configurer) {
if (this.beanFactory.containsBean(TaskExecutionAutoConfiguration.APPLICATION_TASK_EXECUTOR_BEAN_NAME)) {
Object taskExecutor = this.beanFactory
.getBean(TaskExecutionAutoConfiguration.APPLICATION_TASK_EXECUTOR_BEAN_NAME);
if (taskExecutor instanceof AsyncTaskExecutor asyncTaskExecutor) {
configurer.setTaskExecutor(asyncTaskExecutor);
}
}
Duration timeout = this.mvcProperties.getAsync().getRequestTimeout();
if (timeout != null) {
configurer.setDefaultTimeout(timeout.toMillis());
}
}

We need to do similar for WebFlux once spring-projects/spring-framework#30678 has been implemented

@wilkinsona wilkinsona added the type: enhancement A general enhancement label Jul 11, 2023
@wilkinsona wilkinsona added this to the 3.2.x milestone Jul 11, 2023
@wilkinsona wilkinsona added theme: virtual-threads status: blocked An issue that's blocked on an external project change and removed status: blocked An issue that's blocked on an external project change labels Jul 11, 2023
@wilkinsona wilkinsona self-assigned this Jul 18, 2023
@wilkinsona wilkinsona changed the title Configure WebFlux to use the auto-configured AsyncTaskExecutor Configure WebFlux's support for blocking execution to use the auto-configured AsyncTaskExecutor Jul 18, 2023
@wilkinsona wilkinsona modified the milestones: 3.2.x, 3.2.0-M1 Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant