spring-framework / org.springframework.core.task

Package org.springframework.core.task

Types

SyncTaskExecutor

open class SyncTaskExecutor : TaskExecutor, Serializable

TaskExecutor implementation that executes each task synchronously in the calling thread.

Mainly intended for testing scenarios.

Execution in the calling thread does have the advantage of participating in it's thread context, for example the thread context class loader or the thread's current transaction association. That said, in many cases, asynchronous execution will be preferable: choose an asynchronous TaskExecutor instead for such scenarios.

Exceptions

TaskTimeoutException

open class TaskTimeoutException : TaskRejectedException

Exception thrown when a AsyncTaskExecutor rejects to accept a given task for execution because of the specified timeout.