Custom Thread Pools In Java 8 Parallel Streams (#1088)

* String to char array and char array to String.

* Method change

* Custom ThreadPool In Java 8 Parallel Streams

* Implemented suggested edits from editor.

* Broke long method signature

* Changed primitive type int to long and formula.

* Update wrapper type to Long
This commit is contained in:
Dotun Kola-Olaleye 2017-02-02 18:30:05 +01:00 committed by adamd1985
parent c350e8b423
commit a1312e9ce0

View File

@ -21,7 +21,7 @@ public class ThreadPoolInParallelStream {
long firstNum = 1;
long lastNum = 1_000_000;
List<Long> aList = LongStream.range(firstNum, lastNum).boxed()
List<Long> aList = LongStream.rangeClosed(firstNum, lastNum).boxed()
.collect(Collectors.toList());
ForkJoinPool customThreadPool = new ForkJoinPool(4);