Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

ExecutorUtils.createSingleThreadSchedulingDeamonPool ends up creating number of threads equal to the desired queue amount #437

Open
ryanrupp opened this issue Dec 10, 2018 · 1 comment
Assignees

Comments

@ryanrupp
Copy link
Contributor

See the method here which indicates it should be a single thread and has an input parameter for queue size. However, it ends up calling new ScheduledThreadPoolExecutor(corePoolSize, threadFactory) passing the queueCapacity parameter to the corePoolSize. This is used by Elasticsearch reporting code which I believe is trying to batch together requests so should only need 1 thread really (short of getting blocked maybe?).

@ryanrupp
Copy link
Contributor Author

image
See the above threads for instance, queueCapacity is passed as 10 but we end up with 10 threads then.

@liebhaeuser liebhaeuser self-assigned this Dec 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants