Skip to content

Provide first-class virtual thread option on ThreadPoolTaskExecutor/ThreadPoolTaskScheduler #33807

@jhoeller

Description

@jhoeller

As mentioned in ##33780 (comment), there are scenarios where a ThreadPoolTaskExecutor or ThreadPoolTaskScheduler benefits from being configured with a factory for virtual threads. In contrast to SimpleAsyncTaskExecutor/SimpleAsyncTaskScheduler, this is naturally integrated with Spring's lifecycle management for stopping and restarting execution threads, including an early stop signal for a graceful shutdown arrangement. For 6.2, we can provide first-class virtual thread support through a setVirtualThreads(true) flag on ThreadPoolTaskExecutor and ThreadPoolTaskScheduler.

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