线程池ExecutorService submit 返回结果简单示例
1. 先创建自定义ThreadCallBack类,实现Callablepublic class ThreadCallBack implements Callable { private static Callable callable; public static synchronized Callable getInstance(){ if(callable == null){ callable = new ThreadCallBack();
原创
2022-04-26 16:45:27 ·
1284 阅读 ·
0 评论