|Blueprint Extender TaskExecutor poolSize [message #1809351]
||Sat, 13 July 2019 19:53
| Steven Huypens
Registered: October 2015
After upgrading our Gemini Blueprint dependencies to version 2.1.0.RELEASE, we noticed our application took way longer to start up.|
We also saw in the logging there was only 1 single EclipseGeminiBlueprintExtenderThread creating application contexts whereas we had more of them before.
Looking at the code history I found the reason for this changed behaviour in https://bugs.eclipse.org/bugs/show_bug.cgi?id=488009 where a SimpleAsyncTaskExecutor was replaced by a ThreadPoolTaskExecutor in the class ExtenderConfiguration.
This looks like a good change to me, but I'm not sure why the maxPoolSize is set, but the corePoolSize is not (default is 1). In my understanding this results in 1 only thread being created.
From the documentation at https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html
When a new task is submitted in method execute(Runnable), and fewer than corePoolSize threads are running, a new thread is created to handle the request, even if other worker threads are idle. If there are more than corePoolSize but less than maximumPoolSize threads running, a new thread will be created only if the queue is full.
- Does anybody knows if this behaviour is intentional ?
- Are there any downsides to setting the corePoolsize ?
Powered by FUDForum
. Page generated in 0.04220 seconds