Proposal: Custom executor for CompletableFuture in HttpClientImpl
Michał G.
michal.gn at proton.me
Mon Oct 6 18:56:51 UTC 2025
Thanks for the insight, i wasn’t aware of this nice improvement :)
i still think the change in HttpClient could be useful, as it still hardcodes the commonPool and doesn’t allow any customization
>
> On 06/10/2025 18:22, Michał G. wrote:
>
> > :
> >
> > Additionally, since the CompletableFuture default executor is reused, on machines with one or two CPU cores it will fallback to ThreadPerTaskExecutor, causing a new system thread to be created for every HTTP request.
>
> Note that this changed in JDK 25 so that the async methods without an
> explicit Executor will submit to the common pool.
>
> -Alan.
More information about the net-dev
mailing list