Skip to content

Configuration options for virtual threads #30241

Closed
@jhoeller

Description

@jhoeller

In addition to our general compatibility effort in #23443, we are going to explore first-class configuration options for virtual threads: e.g. a virtualThreads flag on SimpleAsyncTaskExecutor or a similar dedicated virtual-thread TaskExecutor implementation with thread naming and concurrency throttle support.

We may also introduce virtual thread flags in places where we currently use a SimpleAsyncTaskExecutor by default, such as in DefaultMessageListenerContainer. These facilities can then conveniently be configured for virtual threads on their own (not having to pass a custom ´Executor` for it) and possibly also as part of a wider-ranging virtual thread setup in Spring Boot 3.2.

In contrast to #23443, this effort will require some level of building against JDK 21, at least for the spring-core module which is likely to centralize the foundational configuration pieces for virtual threads. All other modules would just delegate to those classes/methods on an as-needed basis, without incurring any JDK 21 build requirements or defensive mechanisms for running on JDK 17-20 themselves.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions