Github user franz1981 commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1144#discussion_r108615515 --- Diff: artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ActiveMQThreadPoolExecutor.java --- @@ -46,32 +45,70 @@ private static class ThreadPoolQueue extends LinkedBlockingQueue<Runnable> { private ActiveMQThreadPoolExecutor executor = null; + private int idleThreads = 0; public void setExecutor(ActiveMQThreadPoolExecutor executor) { this.executor = executor; } @Override - public boolean offer(Runnable runnable) { + public synchronized boolean offer(Runnable runnable) { --- End diff -- @bgutjahr @clebertsuconic Today I'll take a look at the code and will do some test on it :) @bgutjahr Do you've tested it against the original with some benchmark tool like [JMH](http://openjdk.java.net/projects/code-tools/jmh/)?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---