void (String[] args) { final Path path = ROOT.toPath(); System.out.println("Statistic for " + path); var forked = walk(path, p -> { Queue<Path> paths = new ConcurrentLinkedQueue<>(); final ForkJoinPool fjp = new ForkJoinPool(THREADS); fjp.invoke(new FileWalker(path, paths::add)); return paths; }, "ForkJoinPool"); var executed = walk(path, p -> { Queue<Path> paths = new ConcurrentLinkedQueue<>(); ExecutorFileWalker walker = new ExecutorFileWalker(p); walker.start(paths::add); return paths; }, "Exec. Service"); var streamed = walk(path, p -> Files.walk(p).parallel().collect(Collectors.toList()), "Streams Par."); }