1.
方法 | 说明 |
runAsync(Runnable runnable) | 使用ForkJoinPool.commonPool()作为它的线程池执行异步代码,无返回值 |
runAsync(Runnable runnable, Executor executor) | 使用指定的thread pool执行异步代码,无返回值 |
supplyAsync(Supplier<U> supplier) | 使用ForkJoinPool.commonPool()作为它的线程池执行异步代码,有返回值 |
supplyAsync(Supplier<U> supplier, Executor executor) | 使用指定的thread pool执行异步代码,有返回值 |
可参考:https://blog.csdn.net/u012129558/article/details/78962759