[jboss-jira] [JBoss JIRA] (DROOLS-885) ExecutorProviderImpl's ThreadPoolExecutor always run with one thread

Mario Fusco (JIRA) issues at jboss.org
Tue Aug 18 06:26:30 EDT 2015


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

Mario Fusco closed DROOLS-885.
------------------------------
    Fix Version/s: 6.3.0.CR2
       Resolution: Done


Fixed by https://github.com/droolsjbpm/drools/commit/8453706a6

> ExecutorProviderImpl's ThreadPoolExecutor always run with one thread
> --------------------------------------------------------------------
>
>                 Key: DROOLS-885
>                 URL: https://issues.jboss.org/browse/DROOLS-885
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 6.3.0.CR1
>            Reporter: Toshiya Kobayashi
>            Assignee: Mario Fusco
>             Fix For: 6.3.0.CR2
>
>
> ExecutorProviderImpl's ThreadPoolExecutor always run with one thread because of LinkedBlockingQueue.
> http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html
> {noformat}
> 2. Unbounded queues. Using an unbounded queue (for example a LinkedBlockingQueue without a predefined capacity) will cause new tasks to wait in the queue when all corePoolSize threads are busy. Thus, no more than corePoolSize threads will ever be created. (And the value of the maximumPoolSize therefore doesn't have any effect.) This may be appropriate when each task is completely independent of others, so tasks cannot affect each others execution; for example, in a web page server. While this style of queuing can be useful in smoothing out transient bursts of requests, it admits the possibility of unbounded work queue growth when commands continue to arrive on average faster than they can be processed. 
> {noformat}
> Sending a PR with a test case and a fix proposal.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list