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

Blocking execution for WebFlux controller methods #30678

Closed
rstoyanchev opened this issue Jun 15, 2023 · 0 comments
Closed

Blocking execution for WebFlux controller methods #30678

rstoyanchev opened this issue Jun 15, 2023 · 0 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

rstoyanchev commented Jun 15, 2023

This was raised and discussed under #21184, but closed with #21184 (comment) potentially to revisit for Loom.

We can enhance WebFuxConfigurer with options for blocking execution, e.g. to configure an AsyncTaskExecutor such as the new VirtualThreadTaskExecutor. The executor would be used to invoke synchronous controller methods, but we can also expose a Predicate for more fine-grained control over that decision.

An AsyncTaskExecutor if configured can also be used in places where we currently default Schedulers#boundedElastic such as DefaultPartHttpMessageReader and InMemoryWebSession to absorb blocking.

WebMvcConfigurer has analogous options, but in support of Servlet 3.1 asynchronous requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant