Fwd: Re: Why one can't submit an alternative thread pool to the streams API?
edward
edo3311 at gmail.com
Sat Oct 12 16:36:53 UTC 2019
Subject: Re: Why one can't submit an alternative thread pool to the
streams API?
Date: Sat, 12 Oct 2019 18:35:55 +0200
From: edward <edo3311 at gmail.com>
To: Cay Horstmann <cay.horstmann at gmail.com>
On 10/12/2019 5:52 PM, Cay Horstmann wrote:
> There is a way to do it--see for example
> https://blog.krecan.net/2014/03/18/how-to-specify-thread-pool-for-java-8-parallel-streams/
>
> It certainly isn't elegant. Perhaps a better way might be an argument
> to the parallel method that specifies the pool to be used?
>
> Il 12/10/19 17:41, edward ha scritto:
>> One can't submit an alternative thread pool to the streams API. A
>> default ForkJoinPool is used. Is there any good reason that is so or
>> can I start working on it and propose JEP?
>>
Yes, you are right Cay and I am aware of that "way". I am just asking is
it was some kind of design decision to omit this from streams API or
simply no one thought about including such option?
More information about the jdk-dev
mailing list