Skip to content

Revisit taskTerminationTimeout semantics on SimpleAsyncTaskExecutor/Scheduler #35372

@jhoeller

Description

@jhoeller

Following up on #35254 (comment), there is a need to clarify the semantics of taskTerminationTimeout on SimpleAsyncTaskExecutor/Scheduler - and potentially to make the time of interruption configurable, similar to waitForTasksToCompleteOnShutdown on ThreadPoolTaskExecutor/Scheduler.

However, the common scenario is not quite analogous since loosely executing individual Threads are not being stopped as part of lifecycle management: With SimpleAsyncTaskExecutor as well as SimpleAsyncTaskScheduler, the only stopping of such loose tasks happens on close(), so it seems sensible to leave some room for them to complete based on their own lifecycle management (as of 6.2.10). For scenarios where immediate interruption is nevertheless desirable, we could provide a configuration flag, effectively opting into pre-6.2.10 behavior.

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