ã¨è¨ã£ã¦ã1ã¡ã½ããå¼ã³åºãã¦ãã ãã§ããã©ã ã½ã¼ã¹ã¯æå¾ã«ããã¦ãã¾ãããæ´æ°ã®ãªã¹ãã®åè¨ãåå¾ãã¦ã¾ãã 次ã®ãããªCallableã¤ã³ã¿ãã§ã¼ã¹ãå®è£ ããã¯ã©ã¹ãç¨æã㦠SummaryTask implements Callable<Integer> ãã®ã¯ã©ã¹ã®ãªã¹ããç¨æã㦠List<SummaryTask> summaryTasks = new ArrayList<>(); ä¸æ°ã«å®è¡éå§ List<Future<Integer>> results = new ForkJoinPool().invokeAll(summaryTasks); æå¾ã«çµæãéè¨ã¨ããæãã§ãã for(Future<Integer> future : results){ result += future.get(); } å®è¡çµæã¨ãã¦ã¯ãã¼ãã®ãã·ã³ã¯ãã¥ã¢ã«ã³ã¢ãªã®ã§ãã ãããï¼åã®é度
{{#tags}}- {{label}}
{{/tags}}