Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-885

ExecutorProviderImpl's ThreadPoolExecutor always run with one thread

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.3.0.CR2
    • 6.3.0.CR1
    • core engine
    • None

      ExecutorProviderImpl's ThreadPoolExecutor always run with one thread because of LinkedBlockingQueue.

      http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html

      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. 
      

      Sending a PR with a test case and a fix proposal.

              mfusco@redhat.com Mario Fusco
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: