Blocking execution for WebFlux controller methods #30678
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
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 anAsyncTaskExecutor
such as the new VirtualThreadTaskExecutor. The executor would be used to invoke synchronous controller methods, but we can also expose aPredicate
for more fine-grained control over that decision.An
AsyncTaskExecutor
if configured can also be used in places where we currently defaultSchedulers#boundedElastic
such asDefaultPartHttpMessageReader
andInMemoryWebSession
to absorb blocking.WebMvcConfigurer
has analogous options, but in support of Servlet 3.1 asynchronous requests.The text was updated successfully, but these errors were encountered: