1.

Is It Possible To Perform Stream Operations In Java 8 With A Thread Pool?

Answer»

Collections PROVIDE the METHOD parallelStream() to create a stream that is processed by a thread pool. ALTERNATIVELY you can call the intermediate method PARALLEL() on a given stream to CONVERT a sequential stream to a parallel counterpart.

Collections provide the method parallelStream() to create a stream that is processed by a thread pool. Alternatively you can call the intermediate method parallel() on a given stream to convert a sequential stream to a parallel counterpart.



Discussion

No Comment Found