ThreadPoolExecutor

https://blog.csdn.net/zmx729618/article/details/51453792

https://www.cnblogs.com/wang-meng/p/10639914.html

ThreadPoolExecutor 主线程异常(excute/submit抛出异常)需要处理;否则会直接跳出本次批量提交 worker的循环;而worker线程异常(Runnable run方法异常)则不会影响主线程提交;

UncaughtExceptionHandler 只有在execute.execute()方法中才生效,在execute.submit中是无法捕获到异常(worker线程异常)的。

posted @ 2019-06-03 15:19  zbjice  阅读(100)  评论(0)    收藏  举报