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

Toshiya Kobayashi (JIRA) issues at jboss.org
Tue Aug 18 04:14:26 EDT 2015


Toshiya Kobayashi created DROOLS-885:
----------------------------------------

             Summary: 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


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