Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-6296

DefaultThreadPool causes warning when minPoolSize == 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Commons Threads 3.2.6
    • Commons Threads 3.2.10
    • Commons
    • None

    Description

      DefaultThreadPool inappropriately emits a warning when a pool has a min pool size of 0.

      A min pool size of 0 is supported by the downstream ThreadExpiringThreadPool, and is logically useful when 'empty' is a reasonable size of a pool, e.g. when no work is apriori expected for the pool.
      The code in question is:
      // Min pool size
      if (this.configuration.getMinPoolSize() < 1)

      { this.configuration.setMinPoolSize(1); this.logger.warn("min-pool-size < 1 for pool \"" + this.name + "\". Set to 1"); }

      The downstream code in ThreadExpiringThreadPool only enforces this value is >= 0.

      Attachments

        Activity

          People

            kwin Konrad Windszus
            rryan@adobe.com Rob Ryan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: