摘要: 一、Future Future是一个接口,所有方法如下: 上源码: package java.util.concurrent; public interface Future<V> { boolean cancel(boolean mayInterruptIfRunning); boolean is 阅读全文
posted @ 2023-02-01 15:20 卫旗 阅读(53) 评论(0) 推荐(0) 编辑
摘要: 一、概述 execute和submit都是线程池中执行任务的方法。 execute是Executor接口中的方法 public interface Executor { void execute(Runnable command); } submit是ExecuteService接口中的方法。 pu 阅读全文
posted @ 2023-02-01 15:18 卫旗 阅读(620) 评论(0) 推荐(0) 编辑