bookmark

concurrency - Custom thread pool in Java 8 parallel stream - Stack Overflow


Description

ForkJoinPool forkJoinPool = new ForkJoinPool(2); forkJoinPool.submit(() -> //parallel task here, for example IntStream.range(1, 1_000_000).parallel().filter(PrimesPrint::isPrime).collect(toList()) ).get();

Preview

Tags

Users

  • @jil

Comments and Reviews