在线程池的api中,Executor接口是最上层的接口,内部只有一个方法。如下:
public interface Executor { void execute(Runnable command); }
ExecutorService接口继承自Executor接口,结构如下:
而线程池的类ThreadPoolExecutor,具体关系如下:
参考博客:https://blog.csdn.net/suifeng3051/article/details/49443835
在线程池的api中,Executor接口是最上层的接口,内部只有一个方法。如下:
public interface Executor { void execute(Runnable command); }
ExecutorService接口继承自Executor接口,结构如下:
而线程池的类ThreadPoolExecutor,具体关系如下:
参考博客:https://blog.csdn.net/suifeng3051/article/details/49443835