## 接口的使用
org.springframework.core.task.TaskExecutor

- 使用TaskExecutor的程序包
  程序包 | 说明
  --- | ---
  org.springframework.core.task | This package defines Spring's core TaskExecutor abstraction, and provides SyncTaskExecutor and SimpleAsyncTaskExecutor implementations.
  org.springframework.core.task.support | Support classes for Spring's TaskExecutor abstraction.

- - ### org.springframework.core.task中TaskExecutor的使用

    org.springframework.core.task中TaskExecutor的子接口
    限定符和类型 | 接口和说明
    --- | ---
    `interface` | `AsyncListenableTaskExecutor` Extension of the `AsyncTaskExecutor` interface, adding the capability to submit tasks for `ListenableFuture`s.
    `interface` | `AsyncTaskExecutor` Extended interface for asynchronous `TaskExecutor` implementations, offering an overloaded `AsyncTaskExecutor.execute(Runnable, long)` variant with a start timeout parameter as well support for `Callable`.

    实现TaskExecutor的org.springframework.core.task中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `SimpleAsyncTaskExecutor` `TaskExecutor` implementation that fires up a new Thread for each task, executing it asynchronously.
    `class` | `SyncTaskExecutor` `TaskExecutor` implementation that executes each task synchronously in the calling thread.

  - ### org.springframework.core.task.support中TaskExecutor的使用

    实现TaskExecutor的org.springframework.core.task.support中的类
    限定符和类型 | 类和说明
    --- | ---
    `class` | `TaskExecutorAdapter` Adapter that takes a JDK `java.util.concurrent.Executor` and exposes a Spring `TaskExecutor` for it.

    参数类型为TaskExecutor的org.springframework.core.task.support中的构造器
    构造器和说明
    `ConcurrentExecutorAdapter(TaskExecutor taskExecutor)` Create a new ConcurrentExecutorAdapter for the given Spring TaskExecutor.
    `ExecutorServiceAdapter(TaskExecutor taskExecutor)` Create a new ExecutorServiceAdapter, using the given target executor.