Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-193

It is safer to make org.apache.commons.pool2.impl.GenericObjectPool.evictor volatile

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: 2.0
    • Labels:
    • Environment:

      Platform: All

      Description

      A field of org.apache.commons.pool2.impl.GenericObjectPool<T> might need to be synchronized. Field org.apache.commons.pool2.impl.GenericObjectPool.evictor is read and written in method org.apache.commons.pool2.impl.GenericObjectPool.startEvictor(long), which might be called by multiple threads concurrently. Is there a possibility that org.apache.commons.pool2.impl.GenericObjectPool.startEvictor(long) gets invoked concurrently? Would it be safer to make org.apache.commons.pool2.impl.GenericObjectPool.evictor volatile?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              samira-t Samira Tasharofi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: