[jboss-jira] [JBoss JIRA] (WFLY-9342) managed-executor-service does not create more than core-threads

Stuart Douglas (JIRA) issues at jboss.org
Wed Sep 13 19:30:00 EDT 2017


     [ https://issues.jboss.org/browse/WFLY-9342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas resolved WFLY-9342.
----------------------------------
    Resolution: Rejected


Unfortunately this is the way that Java executors work. Threads will only be raised to max-threads if the queue is full. So in your case you would need to submit over 1000 tasks before it might start creating new threads.

Even though this is not very intuitive or useful it is how the JDK behaves.

> managed-executor-service does not create more than core-threads
> ---------------------------------------------------------------
>
>                 Key: WFLY-9342
>                 URL: https://issues.jboss.org/browse/WFLY-9342
>             Project: WildFly
>          Issue Type: Bug
>          Components: EE
>    Affects Versions: 11.0.0.CR1
>         Environment: Fedora 25
>            Reporter: Ravi Shankar Nori
>
> <managed-executor-service
>               name="commandCoordinator"
>               jndi-name="java:jboss/ee/concurrency/executor/commandCoordinator"
>               core-threads="1"
>               max-threads="10"
>               queue-length="1000"
>               />
> Creates only one executable thread, does not create additional threads when new tasks are submitted.
> Expected result: When new tasks are submitted more threads should be created capped by max-threads.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list