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

Clean up threads or refresh threads when put back into the pool

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Commons Threads 3.2.2
    • Component/s: Commons
    • Labels:
      None

      Description

      A thread from the pool might use thread locals which are - for whatever reason - not cleaned up, when the thread is put back into the pool.
      This can lead to memory leaks.
      We should protect against this.

      Unfortunately there is no official API to clean up thread locals. There are solutions out there using reflection.
      Another option is to simply discard the thread object after some time of usage and use a fresh one. This needs to include thread objects staying in the pool for a long time

        Attachments

        1. sling-4676-provisional.patch
          11 kB
          Manfred Baedke
        2. SLING-4676-jsedding-1.patch
          16 kB
          Julian Sedding

          Issue Links

            Activity

              People

              • Assignee:
                jsedding Julian Sedding
                Reporter:
                cziegeler Carsten Ziegeler
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: