Deprecate AsyncTaskExecutor.execute(Runnable task, long startTimeout) #27959
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Affects: 5.3.15
The
ThreadPoolTaskExecutor
implements theAsyncTaskExecutor
interface, so it has the methodvoid execute(Runnable task, long startTimeout)
.The implementation for that method silently ignores the timeout. It just calls the execute method without the timeout specified.
The Javadoc for the method says that
startTimeout
is intended as a hint to the executor, but if the implementation does not support it at all I think it would be better to throw aorg.springframework.core.task.TaskRejectedException
instead.To just silently ignore the
startTimeout
gives no clue to the caller that an unsupported method is called.The text was updated successfully, but these errors were encountered: