Executor 之 线程池及定时器

1. Executor系列接口 Executor用于解耦任务(Runnable)提交者和执行者,它只有一个方法void execute(Runnable command),经过调用它向执行者提交任务,但没法知道执行的结果/进度,也没法拿到任务返回值。缓存 ExecutorService 继承Executor,是一个更具体的接口。它额外提供了如下方法:异步 关闭执行者工具   shutdown();
相关文章
相关标签/搜索