import java.util.concurrent.ForkJoinPool import java.util.concurrent.RecursiveTask @Log4j2 class ForkJoinT...extends RecursiveTask { static def data = 1..100 as List int start int end ForkJoinT...end) } else { def middle = ((start + end) / 2) as int def left = new ForkJoinT...(start, middle) def right = new ForkJoinT(middle + 1, end) left.fork()...下面是测试代码: static void main(String[] args) { def pool = new ForkJoinPool(5) def t = new ForkJoinT
领取专属 10元无门槛券
手把手带您无忧上云