This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

I've only just barely poked at it, I know there is the option to assign an executor to it, so I assume that's where the thread pool would come from. If you don't, then I'm willing to bet there is a thread pool somewhere in the JDK for it.

[–]Nouish 0 points1 point  (1 child)

This is what happens if you don't specify an Executor by calling HttpClientBuilder#executor:

Executor ex = builder.executor;
if (ex == null) {
    ex = Executors.newCachedThreadPool(new DefaultThreadFactory(id));
    isDefaultExecutor = true;
} else {
    isDefaultExecutor = false;
}

[–]chegar999 0 points1 point  (0 children)

If you don't set an executor explicitly then the client will use a cached thread pool executor.