Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-2464

Allow DistributedExecutorService to control shutdown of given local ExecutorService

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Major Major
    • 5.2.0.Final
    • 5.2.0.Final
    • Clustered Executor
    • None

      Constructors that receive a thread pool from clients not shut it down on stop: it's a good rule of resource management for the creator of the resource (thread pool for us) to manage the shutdown as well.
      So here's how I think this can be solved:
      1. Add a new Ctor that besides the pool also has a flag to allow us to take ownership of the pool (i.e. we'll destroy it when the DistExec is shutdow)
      2. leave the current constructor as it is, make it internally invoke 1. with takeOwnership=true (this would preserve backward compatibility)
      3. amend the executor to only shutdown the thread pool if it has ownership
      4. document the threadpool ownership in all constructors

              vblagoje Vladimir Blagojevic (Inactive)
              vblagoje Vladimir Blagojevic (Inactive)
              Archiver:
              rhn-support-adongare Amol Dongare

                Created:
                Updated:
                Resolved:
                Archived: